https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8741e2bb3ce606f8ff38…
commit b8741e2bb3ce606f8ff383496b32f0db076c480c
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Thu Feb 22 11:51:07 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Thu Feb 22 11:53:34 2018 +0100
[SHELL32] Fix PIDL leak in CMenuSFToolbar::FillToolbar. CORE-13194
---
dll/win32/shell32/shellmenu/CMenuToolbars.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
index 2e8dbf3463..c1cd0b1a95 100644
--- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
+++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
@@ -1321,7 +1321,11 @@ HRESULT CMenuSFToolbar::FillToolbar(BOOL clearFirst)
{
if (m_menuBand->_CallCBWithItemPidl(item, 0x10000000, 0, 0) == S_FALSE)
{
- DPA_AppendPtr(dpaSort, ILClone(item));
+ DPA_AppendPtr(dpaSort, item);
+ }
+ else
+ {
+ CoTaskMemFree(item);
}
hr = eidl->Next(1, &item, NULL);