Skip to content

Commit

Permalink
Fix crash in omaha::goopdate_utils::StartGoogleUpdateWithArgs at line…
Browse files Browse the repository at this point in the history
… 381

The |process| parameter passed to StartGoogleUpdateWithArgs() can be NULL. This CL handles the NULL case now.
  • Loading branch information
sorinj committed Jan 23, 2021
1 parent 169a4f1 commit bece74c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion omaha/common/goopdate_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,11 @@ HRESULT StartGoogleUpdateWithArgs(bool is_machine,
}

if (start_mode != StartMode::kForeground) {
*process = pi.hProcess;
if (process) {
*process = pi.hProcess;
} else {
::CloseHandle(pi.hProcess);
}
::CloseHandle(pi.hThread);
}

Expand Down

1 comment on commit bece74c

@bladester2020
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Help enabling JavaScript please

Please sign in to comment.