diff options
author | Jeff Tang <mrjefftang@users.noreply.github.com> | 2015-04-27 16:27:32 -0400 |
---|---|---|
committer | Jeff Tang <mrjefftang@users.noreply.github.com> | 2015-04-27 16:27:32 -0400 |
commit | a6cb7f927f40bd129f31493c37dfe7d0d6f6a070 (patch) | |
tree | d84429672186a53bab556b987e0544b9d893043f | |
parent | 9ba8a6c120b284465f01f4a4aee93662b2617fc5 (diff) | |
download | psutil-a6cb7f927f40bd129f31493c37dfe7d0d6f6a070.tar.gz |
Remove possible hMap==NULL case
-rw-r--r-- | psutil/arch/windows/process_handles.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/psutil/arch/windows/process_handles.c b/psutil/arch/windows/process_handles.c index 527b2803..2840b613 100644 --- a/psutil/arch/windows/process_handles.c +++ b/psutil/arch/windows/process_handles.c @@ -454,11 +454,7 @@ psutil_get_open_files_getmappedfilename(long dwPid, HANDLE hProcess) hHandle->HandleValue, GetLastError()); */ - if (GetLastError() == ERROR_BAD_EXE_FORMAT || - GetLastError() == ERROR_INVALID_HANDLE) - { - goto loop_cleanup; - } + goto loop_cleanup; } pMem = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 1); |