winedbg: Free snapshot handle in error path (Coverity).
This commit is contained in:
parent
2bc8e076e0
commit
45eeeb00f3
|
@ -509,7 +509,11 @@ void info_win32_processes(void)
|
||||||
dp.count = 0;
|
dp.count = 0;
|
||||||
dp.alloc = 16;
|
dp.alloc = 16;
|
||||||
dp.entries = HeapAlloc(GetProcessHeap(), 0, sizeof(*dp.entries) * dp.alloc);
|
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);
|
dp.entries[dp.count].proc.dwSize = sizeof(dp.entries[dp.count].proc);
|
||||||
ok = Process32First(snap, &dp.entries[dp.count].proc);
|
ok = Process32First(snap, &dp.entries[dp.count].proc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue