Commit 7b89fb5e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

dbghelp: Check file handles against INVALID_HANDLE_VALUE, not NULL.

parent 9b4f9978
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment