https://git.reactos.org/?p=reactos.git;a=commitdiff;h=92c904addc82733826dc8…
commit 92c904addc82733826dc8c9ee8c2e1d9b4cf997c
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Oct 10 08:47:24 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Oct 10 08:48:59 2022 +0900
[SHELL32] DestroyMenu on m_pShellMenu->SetMenu failure
CORE-13194
---
dll/win32/shell32/shellmenu/CStartMenu.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/shellmenu/CStartMenu.cpp
b/dll/win32/shell32/shellmenu/CStartMenu.cpp
index e21bf851ada..85d61e9f3f7 100644
--- a/dll/win32/shell32/shellmenu/CStartMenu.cpp
+++ b/dll/win32/shell32/shellmenu/CStartMenu.cpp
@@ -86,13 +86,16 @@ private:
if (FAILED_UNEXPECTEDLY(hr))
return hr;
- hr = m_pTrayPriv->AppendMenuW(&hmenu);
+ hr = m_pTrayPriv->AppendMenu(&hmenu);
if (FAILED_UNEXPECTEDLY(hr))
return hr;
hr = m_pShellMenu->SetMenu(hmenu, NULL, SMSET_BOTTOM);
if (FAILED_UNEXPECTEDLY(hr))
+ {
+ DestroyMenu(hmenu);
return hr;
+ }
return hr;
}