dbghelp: Check file handles against INVALID_HANDLE_VALUE, not NULL.

This commit is contained in:
Francois Gouget 2007-03-08 15:28:40 +01:00 committed by Alexandre Julliard
parent 9b4f99782e
commit 7b89fb5e35
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}