You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by tn...@apache.org on 2015/02/27 02:39:16 UTC

mesos git commit: Fix potential memleak is stout/os.hpp.

Repository: mesos
Updated Branches:
  refs/heads/master d82e0abeb -> 4337411d3


Fix potential memleak is stout/os.hpp.

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


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

Branch: refs/heads/master
Commit: 4337411d3db1207170577e6a52ebf410d65c851e
Parents: d82e0ab
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Thu Feb 26 17:39:49 2015 -0800
Committer: Timothy Chen <tn...@apache.org>
Committed: Thu Feb 26 17:39:49 2015 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4337411d/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
index 8a4fda9..d28f3f7 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp
@@ -660,6 +660,7 @@ inline Result<uid_t> getuid(const Option<std::string>& user = None())
           errno == ESRCH ||
           errno == EBADF ||
           errno == EPERM) {
+        delete[] buffer;
         return None();
       }
 
@@ -715,6 +716,7 @@ inline Result<gid_t> getgid(const Option<std::string>& user = None())
           errno == ESRCH ||
           errno == EBADF ||
           errno == EPERM) {
+        delete[] buffer;
         return None();
       }