[SCM] Samba Shared Repository - branch v3-6-test updated

Jeremy Allison jra at samba.org
Wed Apr 27 16:38:48 MDT 2011


The branch, v3-6-test has been updated
       via  9078ceb s3: Properly clean up in pthreadpool_init in case of failure
       via  73a5bd3 s3-netapi: Fix Coverity CID #2302: FORWARD_NULL
      from  5ca46ff docs: Fix a bogus )

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 9078ceb6109a3f375afbcb864307d456bc4057dd
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Apr 27 22:18:12 2011 +0200

    s3: Properly clean up in pthreadpool_init in case of failure
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Wed Apr 27 23:57:19 CEST 2011 on sn-devel-104
    (cherry picked from commit a8a6433fec0a8dfa6a584cd7b742d469ccfa6273)

commit 73a5bd3343c54579e0927eefd186f438f9275d85
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 27 15:41:49 2011 +0200

    s3-netapi: Fix Coverity CID #2302: FORWARD_NULL
    
    Guenther
    (cherry picked from commit ee0b0dd3a150dea35ef57d5867519a7df382137c)

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

Summary of changes:
 source3/lib/netapi/localgroup.c       |    2 +-
 source3/lib/pthreadpool/pthreadpool.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index 51f4e1d..49ba74e 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -1344,7 +1344,7 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
 	werr = WERR_OK;
 
  done:
-	if (is_valid_policy_hnd(&alias_handle)) {
+	if (b && is_valid_policy_hnd(&alias_handle)) {
 		dcerpc_samr_Close(b, talloc_tos(), &alias_handle, &result);
 	}
 
diff --git a/source3/lib/pthreadpool/pthreadpool.c b/source3/lib/pthreadpool/pthreadpool.c
index 3cf6cb7..7538fb7 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -120,6 +120,8 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult)
 
 	ret = pthread_mutex_init(&pool->mutex, NULL);
 	if (ret != 0) {
+		close(pool->sig_pipe[0]);
+		close(pool->sig_pipe[1]);
 		free(pool);
 		return ret;
 	}
@@ -127,6 +129,8 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult)
 	ret = pthread_cond_init(&pool->condvar, NULL);
 	if (ret != 0) {
 		pthread_mutex_destroy(&pool->mutex);
+		close(pool->sig_pipe[0]);
+		close(pool->sig_pipe[1]);
 		free(pool);
 		return ret;
 	}
@@ -143,6 +147,8 @@ int pthreadpool_init(unsigned max_threads, struct pthreadpool **presult)
 	if (ret != 0) {
 		pthread_cond_destroy(&pool->condvar);
 		pthread_mutex_destroy(&pool->mutex);
+		close(pool->sig_pipe[0]);
+		close(pool->sig_pipe[1]);
 		free(pool);
 		return ret;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list