winedbg: Free snapshot handle in error path (Coverity).

This commit is contained in:
Marcus Meissner 2013-01-05 23:32:53 +01:00 committed by Alexandre Julliard
parent 2bc8e076e0
commit 45eeeb00f3
1 changed files with 5 additions and 1 deletions

View File

@ -509,7 +509,11 @@ void info_win32_processes(void)
dp.count = 0;
dp.alloc = 16;
dp.entries = HeapAlloc(GetProcessHeap(), 0, sizeof(*dp.entries) * dp.alloc);
if (!dp.entries) return;
if (!dp.entries)
{
CloseHandle(snap);
return;
}
dp.entries[dp.count].proc.dwSize = sizeof(dp.entries[dp.count].proc);
ok = Process32First(snap, &dp.entries[dp.count].proc);