https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b7aa1e3122baf4c9a6907…
commit b7aa1e3122baf4c9a6907c1a733508b4e1a2a800
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Mar 3 08:19:48 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Mar 3 17:19:16 2018 +0100
[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu.
CORE-12180
---
win32ss/user/ntuser/menu.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index dc6656ffb3..ccaed593df 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -5092,15 +5092,13 @@ PMENU FASTCALL MENU_GetSystemMenu(PWND Window, PMENU Popup)
if (!hNewMenu)
{
ERR("No Menu!!\n");
- IntReleaseMenuObject(SysMenu);
- UserDestroyMenu(hSysMenu);
+ IntDestroyMenuObject(SysMenu, FALSE);
return NULL;
}
Menu = UserGetMenuObject(hNewMenu);
if (!Menu)
{
- IntReleaseMenuObject(SysMenu);
- UserDestroyMenu(hSysMenu);
+ IntDestroyMenuObject(SysMenu, FALSE);
return NULL;
}