From 4ee3ddcd336f758dfd8e22730626846410f01e6f Mon Sep 17 00:00:00 2001 From: mmentovai Date: Mon, 28 Sep 2009 23:53:28 +0000 Subject: [PATCH] Check RegisterWaitForSingleObject return in CrashGenerationServer::Start. Patch by Matt Mueller Review URL: http://codereview.chromium.org/244028 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@402 4c0a9323-5329-0410-9bdc-e9ce6186880e --- .../crash_generation/crash_generation_server.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/client/windows/crash_generation/crash_generation_server.cc b/src/client/windows/crash_generation/crash_generation_server.cc index ac76e590..dafa5c2a 100644 --- a/src/client/windows/crash_generation/crash_generation_server.cc +++ b/src/client/windows/crash_generation/crash_generation_server.cc @@ -218,12 +218,14 @@ bool CrashGenerationServer::Start() { } // Register a callback with the thread pool for the client connection. - RegisterWaitForSingleObject(&pipe_wait_handle_, - overlapped_.hEvent, - OnPipeConnected, - this, - INFINITE, - kPipeIOThreadFlags); + if (!RegisterWaitForSingleObject(&pipe_wait_handle_, + overlapped_.hEvent, + OnPipeConnected, + this, + INFINITE, + kPipeIOThreadFlags)) { + return false; + } pipe_ = CreateNamedPipe(pipe_name_.c_str(), kPipeAttr,