You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2015/09/28 20:48:06 UTC

mesos git commit: Fixed a file descriptor leak in error handling in poll_socket.cpp.

Repository: mesos
Updated Branches:
  refs/heads/master 82fb36ac0 -> d8264ec62


Fixed a file descriptor leak in error handling in poll_socket.cpp.

Review: https://reviews.apache.org/r/38810


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d8264ec6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d8264ec6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d8264ec6

Branch: refs/heads/master
Commit: d8264ec626e623e096b1521b9e9f8b56c5d3aa38
Parents: 82fb36a
Author: Chi Zhang <ch...@gmail.com>
Authored: Mon Sep 28 11:47:01 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Sep 28 11:47:01 2015 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/poll_socket.cpp | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d8264ec6/3rdparty/libprocess/src/poll_socket.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/poll_socket.cpp b/3rdparty/libprocess/src/poll_socket.cpp
index 4da62b6..28ed102 100644
--- a/3rdparty/libprocess/src/poll_socket.cpp
+++ b/3rdparty/libprocess/src/poll_socket.cpp
@@ -79,6 +79,7 @@ Future<Socket> accept(int fd)
 
   Try<Socket> socket = Socket::create(Socket::DEFAULT_KIND(), s);
   if (socket.isError()) {
+    os::close(s);
     return Failure("Failed to accept, create socket: " + socket.error());
   }
   return socket.get();