From 427bda68a51c1f7107d78a8358d19adb1dacc1c0 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 14 Jun 2008 00:00:20 +0000 Subject: [PATCH] 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 --- reactos/dll/win32/user32/windows/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/windows/menu.c b/reactos/dll/win32/user32/windows/menu.c index 57b7ac8641a..bf187f4c4e6 100644 --- a/reactos/dll/win32/user32/windows/menu.c +++ b/reactos/dll/win32/user32/windows/menu.c @@ -3963,7 +3963,7 @@ MenuCheckMenuRadioItem(HMENU hMenu, UINT idFirst, UINT idLast, UINT idCheck, UIN break; } } - MenuCleanupRosMenuItemInfo(Items); + HeapFree(GetProcessHeap(), 0, Items); *pChecked += cChecked; *pUnchecked += cUnchecked; -- 2.17.1