[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu. CORE...
authorThomas Faber <thomas.faber@reactos.org>
Sat, 3 Mar 2018 07:19:48 +0000 (08:19 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 3 Mar 2018 16:19:16 +0000 (17:19 +0100)
win32ss/user/ntuser/menu.c

index dc6656f..ccaed59 100644 (file)
@@ -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;
       }