diff options
author | rsesek@chromium.org <rsesek@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2014-05-06 19:52:55 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2014-05-06 19:52:55 +0000 |
commit | 40cd690901954548b0ed77dbd241f5892428ee9a (patch) | |
tree | b6dfa3580d63bc78ec57bb1963be4d08a0634986 /src/client/linux/crash_generation | |
parent | Add support for CFI based stack walking on Arm64. (diff) | |
download | breakpad-40cd690901954548b0ed77dbd241f5892428ee9a.tar.xz |
FD leaks and handle errors better.
Patch from Matthew Dempsky <mdempsky@chromium.org>.
Original review: https://breakpad.appspot.com/5654002/
Review URL: https://breakpad.appspot.com/1674002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1326 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/crash_generation')
-rw-r--r-- | src/client/linux/crash_generation/crash_generation_client.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/linux/crash_generation/crash_generation_client.cc b/src/client/linux/crash_generation/crash_generation_client.cc index aed13e14..2522c955 100644 --- a/src/client/linux/crash_generation/crash_generation_client.cc +++ b/src/client/linux/crash_generation/crash_generation_client.cc @@ -74,8 +74,10 @@ class CrashGenerationClientImpl : public CrashGenerationClient { ssize_t ret = HANDLE_EINTR(sys_sendmsg(server_fd_, &msg, 0)); sys_close(fds[1]); - if (ret < 0) + if (ret < 0) { + sys_close(fds[0]); return false; + } // Wait for an ACK from the server. char b; |