dbghelp: Check file handles against INVALID_HANDLE_VALUE, not NULL.
This commit is contained in:
parent
9b4f99782e
commit
7b89fb5e35
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue