Author: pschweitzer Date: Sat Oct 24 10:24:37 2015 New Revision: 69673
URL: http://svn.reactos.org/svn/reactos?rev=69673&view=rev Log: [SHELL32] Fix a memory leak
CID 1322131
Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp
Modified: trunk/reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellmenu... ============================================================================== --- trunk/reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shellmenu/CMenuToolbars.cpp [iso-8859-1] Sat Oct 24 10:24:37 2015 @@ -1321,6 +1321,7 @@ // If no items were added, show the "empty" placeholder if (DPA_GetPtrCount(dpaSort) == 0) { + DPA_Destroy(dpaSort); return AddPlaceholder(); }
@@ -1341,7 +1342,10 @@
hr = m_shellFolder->GetDisplayNameOf(item, SIGDN_NORMALDISPLAY, &sr); if (FAILED_UNEXPECTEDLY(hr)) + { + DPA_Destroy(dpaSort); return hr; + }
StrRetToStr(&sr, NULL, &MenuString);