Commit e3357fc1 authored by Adam Edwards's avatar Adam Edwards Committed by adamedx
Browse files

Only close handles that are set to a valid handle value

parent 0ba04824
......@@ -346,9 +346,9 @@ module Process
# Automatically close the process and thread handles in the
# PROCESS_INFORMATION struct unless explicitly told not to.
if hash['close_handles']
CloseHandle(procinfo[:hProcess]) if procinfo[:hProcess]
CloseHandle(procinfo[:hThread]) if procinfo[:hThread]
CloseHandle(token) if token
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