[PATCH] lib: Fix CID 1338432 Unchecked return value

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 10 09:01:02 UTC 2015


Hi!

Review&push appreciated!

Thanks, Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 651fdfc573854788b72669262c5b52b10db39074 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 10 Nov 2015 09:56:56 +0100
Subject: [PATCH] lib: Fix CID 1338432 Unchecked return value

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/lib/pthreadpool/pthreadpool.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/source3/lib/pthreadpool/pthreadpool.c b/source3/lib/pthreadpool/pthreadpool.c
index d683578..4b745e4 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -274,7 +274,16 @@ static void pthreadpool_join_children(struct pthreadpool *pool)
 	int i;
 
 	for (i=0; i<pool->num_exited; i++) {
-		pthread_join(pool->exited[i], NULL);
+		int ret;
+
+		ret = pthread_join(pool->exited[i], NULL);
+		if (ret != 0) {
+			/*
+			 * Severe internal error, we can't do much but
+			 * abort here.
+			 */
+			abort();
+		}
 	}
 	pool->num_exited = 0;
 
-- 
1.7.9.5



More information about the samba-technical mailing list