[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Wed Apr 27 15:58:02 MDT 2011


The branch, master has been updated
       via  a8a6433 s3: Properly clean up in pthreadpool_init in case of failure
      from  91ebf22 s3-rpc_server Fix compile without kerberos

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


- Log -----------------------------------------------------------------
commit a8a6433fec0a8dfa6a584cd7b742d469ccfa6273
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

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

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


Changeset truncated at 500 lines:

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