summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/helper.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 00:27:08 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 00:27:08 +0000
commit4eedb4c90b07cf41946033366262a126e2e79ae8 (patch)
tree374c7bb82c32f1491363be6e43c9b4dcfe5fd881 /chrome/installer/util/helper.cc
parentbc54e8ec2689049fe40ab6d59435935235bdc23c (diff)
downloadchromium_src-4eedb4c90b07cf41946033366262a126e2e79ae8.zip
chromium_src-4eedb4c90b07cf41946033366262a126e2e79ae8.tar.gz
chromium_src-4eedb4c90b07cf41946033366262a126e2e79ae8.tar.bz2
Fixit: Coverity check return value.
Review URL: http://codereview.chromium.org/159320 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/helper.cc')
-rw-r--r--chrome/installer/util/helper.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index a87bcf9..af18e9e 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -73,9 +73,12 @@ bool installer::LaunchChromeAndWaitForResult(bool system_install,
}
DWORD wr = ::WaitForSingleObject(pi.hProcess, INFINITE);
- if (exit_code) {
- ::GetExitCodeProcess(pi.hProcess, reinterpret_cast<DWORD*>(exit_code));
- }
+ DWORD ret;
+ if (::GetExitCodeProcess(pi.hProcess, &ret) == 0)
+ return false;
+
+ if (exit_code)
+ *exit_code = ret;
::CloseHandle(pi.hProcess);
::CloseHandle(pi.hThread);