Don't use MenuCleanupRosMenuItemInfo for an array of Items allocated on the heap!

This function is meant to be used for a single menu item info and just frees the memory allocated for dwTypeInfo.

Replaced this with a simple HeapFree call to free the memory for the whole array allocated in MenuGetAllRosMenuItemInfo.
Fixes a heap corruption discovered by encoded.

See issue #3349 for more details.

svn path=/trunk/; revision=33959
This commit is contained in:
Colin Finck 2008-06-14 00:00:20 +00:00
parent aa42a19f40
commit 427bda68a5

View file

@ -3963,7 +3963,7 @@ MenuCheckMenuRadioItem(HMENU hMenu, UINT idFirst, UINT idLast, UINT idCheck, UIN
break; break;
} }
} }
MenuCleanupRosMenuItemInfo(Items); HeapFree(GetProcessHeap(), 0, Items);
*pChecked += cChecked; *pChecked += cChecked;
*pUnchecked += cUnchecked; *pUnchecked += cUnchecked;