[PATCH] Fix a Coverity finding

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Apr 24 15:24:08 UTC 2018


Hi!

Review 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 9f1b0c35f36a8e2e6f49065981a7b4c993f2c040 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Tue, 24 Apr 2018 10:37:26 +0200
Subject: [PATCH] torture3: Fix CID 1435119 Error handling issues
 (CHECKED_RETURN)

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/torture/bench_pthreadpool.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/source3/torture/bench_pthreadpool.c b/source3/torture/bench_pthreadpool.c
index 4269b5360f8..3d581e9e5b6 100644
--- a/source3/torture/bench_pthreadpool.c
+++ b/source3/torture/bench_pthreadpool.c
@@ -58,7 +58,11 @@ bool run_bench_pthreadpool(int dummy)
 		}
 	}
 
-	pthreadpool_pipe_destroy(pool);
+	if (ret != 1) {
+		return false;
+	}
+
+	ret = pthreadpool_pipe_destroy(pool);
 
-	return (ret == 1);
+	return (ret == 0);
 }
-- 
2.11.0



More information about the samba-technical mailing list