- Avoid a memory leak in User32EnumWindows in case the window count is zero.
CORE-13194
svn path=/trunk/; revision=74497
if (!NT_SUCCESS(Status))
return FALSE;
+ if (!dwCount)
+ {
+ if (!dwThreadId)
+ return FALSE;
+ else
+ return TRUE;
+ }
+
/* allocate buffer to receive HWND handles */
hHeap = GetProcessHeap();
pHwnd = HeapAlloc(hHeap, 0, sizeof(HWND)*(dwCount+1));
return FALSE;
}
- if (!dwCount)
- {
- if (!dwThreadId)
- return FALSE;
- else
- return TRUE;
- }
-
/* call the user's callback function until we're done or
they tell us to quit */
for ( i = 0; i < dwCount; i++ )