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/29 02:27:04 UTC
mesos git commit: Fixed a file descriptor leak in io::redirect.
Repository: mesos
Updated Branches:
refs/heads/master 3b1e937ec -> 45e40348c
Fixed a file descriptor leak in io::redirect.
Review: https://reviews.apache.org/r/38823
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/45e40348
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/45e40348
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/45e40348
Branch: refs/heads/master
Commit: 45e40348cdc1201fb4915e1de4ac7d5013a896f6
Parents: 3b1e937
Author: Chi Zhang <ch...@gmail.com>
Authored: Mon Sep 28 17:26:43 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Sep 28 17:26:43 2015 -0700
----------------------------------------------------------------------
3rdparty/libprocess/src/io.cpp | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/45e40348/3rdparty/libprocess/src/io.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/io.cpp b/3rdparty/libprocess/src/io.cpp
index d17ccf7..26686e1 100644
--- a/3rdparty/libprocess/src/io.cpp
+++ b/3rdparty/libprocess/src/io.cpp
@@ -537,6 +537,7 @@ Future<Nothing> redirect(int from, Option<int> to, size_t chunk)
// Duplicate 'from' so that we're in control of its lifetime.
from = dup(from);
if (from == -1) {
+ os::close(to.get());
return Failure(ErrnoError("Failed to duplicate 'from' file descriptor"));
}