[SCM] UID Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Apr 8 01:30:16 MDT 2014


The branch, master has been updated
       via  b4a3718 uwrap: Fix memory leak on error.
       via  5c0131b cmake: Only set policy in cmake 3.0.
      from  6f441ee cmake: Fix configure warning with cmake 3.0.

http://gitweb.samba.org/?p=uid_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b4a3718808f650f8a19bcaf43fca00a2cec265a0
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 8 09:24:42 2014 +0200

    uwrap: Fix memory leak on error.
    
    Found by Coverity.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 5c0131b517bb8319095f2a7c35576708a310e3a4
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 8 09:24:21 2014 +0200

    cmake: Only set policy in cmake 3.0.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 src/CMakeLists.txt |    4 +++-
 src/uid_wrapper.c  |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e0f2011..be1bede 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -22,6 +22,8 @@ install(
 )
 
 # This needs to be at the end
-cmake_policy(SET CMP0026 OLD)
+if (CMAKE_VERSION VERSION_GREATER 2.8.12)
+    cmake_policy(SET CMP0026 OLD)
+endif()
 get_target_property(UWRAP_LOCATION uid_wrapper LOCATION)
 set(UID_WRAPPER_LOCATION ${UWRAP_LOCATION} PARENT_SCOPE)
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c
index cb99481..742903a 100644
--- a/src/uid_wrapper.c
+++ b/src/uid_wrapper.c
@@ -431,6 +431,7 @@ static int uwrap_new_id(pthread_t tid, bool do_alloc)
 
 		id->groups = malloc(sizeof(gid_t) * 1);
 		if (id->groups == NULL) {
+			SAFE_FREE(id);
 			errno = ENOMEM;
 			return -1;
 		}


-- 
UID Wrapper Repository


More information about the samba-cvs mailing list