Author: akhaldi
Date: Tue Mar 11 13:06:09 2014
New Revision: 62474
URL:
http://svn.reactos.org/svn/reactos?rev=62474&view=rev
Log:
[SHELL32_APITEST]
* Plug some leaks. CIDs 1106362, 1106363 and 1106364.
CORE-7975
Modified:
trunk/rostests/apitests/shell32/menu.cpp
Modified: trunk/rostests/apitests/shell32/menu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/shell32/menu.cpp…
==============================================================================
--- trunk/rostests/apitests/shell32/menu.cpp [iso-8859-1] (original)
+++ trunk/rostests/apitests/shell32/menu.cpp [iso-8859-1] Tue Mar 11 13:06:09 2014
@@ -11,7 +11,11 @@
{
ULONG size = (wcslen(className) + 1)* sizeof(WCHAR);
PWCHAR buffer = (PWCHAR)malloc(size);
- if (GetClassNameW(hwnd, buffer, size ) == 0) return FALSE;
+ if (GetClassNameW(hwnd, buffer, size ) == 0)
+ {
+ free(buffer);
+ return FALSE;
+ }
int res = wcscmp(buffer, className);
free(buffer);
return res == 0;
@@ -161,6 +165,7 @@
if (!CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite))
{
skip("failed to create CShellMenuObject\n");
+ delete dummyWindow;
return;
}
@@ -288,6 +293,7 @@
if (!CreateCShellMenu(&shellMenu, &dockingMenu, &menuWithSite))
{
skip("failed to create CShellMenuObject\n");
+ delete dummyWindow;
return;
}