Module: wine Branch: master Commit: 7b89fb5e35e8ad24bbfc2fdced1691897c7cea2e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b89fb5e35e8ad24bbfc2fdced...
Author: Francois Gouget fgouget@free.fr Date: Thu Mar 8 15:28:40 2007 +0100
dbghelp: Check file handles against INVALID_HANDLE_VALUE, not NULL.
---
dlls/dbghelp/msc.c | 2 +- dlls/dbghelp/pe_module.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index febebd4..00ba7c2 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2308,7 +2308,7 @@ BOOL pdb_fetch_file_info(struct pdb_lookup* pdb_lookup)
if (image) UnmapViewOfFile(image); if (hMap) CloseHandle(hMap); - if (hFile) CloseHandle(hFile); + if (hFile != INVALID_HANDLE_VALUE) CloseHandle(hFile);
return ret; } diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index be0443a..f8346d1 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -142,7 +142,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
if (dbg_mapping) UnmapViewOfFile(dbg_mapping); if (hMap) CloseHandle(hMap); - if (hFile != NULL) CloseHandle(hFile); + if (hFile != INVALID_HANDLE_VALUE) CloseHandle(hFile); return ret; }