From 789eac95fdbb6313922a9d15889444e9dedfceb9 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Wed, 11 Apr 2012 20:44:09 +0000 Subject: Fix file descriptor leaks in ExternalDumper test Patch by Chris Dearman R=ted at http://breakpad.appspot.com/372002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@951 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/handler/exception_handler_unittest.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client') diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index f8024f26..84fc08ed 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -736,6 +736,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) { ASSERT_EQ(n, kCrashContextSize); ASSERT_EQ(msg.msg_controllen, kControlMsgSize); ASSERT_EQ(msg.msg_flags, 0); + ASSERT_EQ(close(fds[0]), 0); pid_t crashing_pid = -1; int signal_fd = -1; @@ -764,6 +765,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) { kCrashContextSize)); static const char b = 0; HANDLE_EINTR(write(signal_fd, &b, 1)); + ASSERT_EQ(close(signal_fd), 0); int status; ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); -- cgit v1.2.1