Marcus Meissner : winedbg: Free snapshot handle in error path (Coverity).
Alexandre Julliard
julliard at winehq.org
Mon Jan 7 13:42:20 CST 2013
Module: wine
Branch: master
Commit: 45eeeb00f36c6e05762847426293ecaa6568115a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45eeeb00f36c6e05762847426293ecaa6568115a
Author: Marcus Meissner <meissner at suse.de>
Date: Sat Jan 5 23:32:53 2013 +0100
winedbg: Free snapshot handle in error path (Coverity).
---
programs/winedbg/info.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c
index fb60afe..c0b86ba 100644
--- a/programs/winedbg/info.c
+++ b/programs/winedbg/info.c
@@ -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);
More information about the wine-cvs
mailing list