Close handles properly
Change-Id: If8620229d41ae9b6c0a1714967a8bb6d51d3ba0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179939 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -168,6 +168,7 @@ void RegDLL(MSIHANDLE hInst, const std::wstring& sArgs, bool bUnreg)
|
||||
if (!CreateProcessW(sRegSvr32.c_str(), const_cast<LPWSTR>(sCmd.c_str()), nullptr, nullptr,
|
||||
FALSE, CREATE_NO_WINDOW, nullptr, nullptr, &si, &pi))
|
||||
ThrowLastError("CreateProcessW");
|
||||
CloseHandle(pi.hThread);
|
||||
auto aCloseProcHandleGuard(Guard(pi.hProcess));
|
||||
WriteLog(hInst, "CreateProcessW succeeded");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user