Skip to content

Commit abf0d38

Browse files
committed
Closed handles when ShellExecuteExW with SEE_MASK_NOCLOSEPROCESS
1 parent 8cba312 commit abf0d38

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

ExplorerPatcher/GUI.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
974974
{
975975

976976
}
977+
CloseHandle(sei.hProcess);
977978
}
978979
else
979980
{

ep_setup/ep_setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ int WINAPI wWinMain(
431431
DWORD dwExitCode = 0;
432432
GetExitCodeProcess(sei.hProcess, &dwExitCode);
433433
SetLastError(dwExitCode);
434+
CloseHandle(sei.hProcess);
434435
}
435436
}
436437
}

ep_setup_patch/ep_setup_patch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ int main(int argc, char** argv)
6161
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
6262
DWORD dwExitCode = 0;
6363
GetExitCodeProcess(ShExecInfo.hProcess, &dwExitCode);
64+
CloseHandle(ShExecInfo.hProcess);
6465
return dwExitCode;
6566
}
6667
}

0 commit comments

Comments
 (0)