torture3: Fix CID 1435119 Error handling issues (CHECKED_RETURN)
authorVolker Lendecke <vl@samba.org>
Tue, 24 Apr 2018 08:37:26 +0000 (10:37 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 24 Apr 2018 17:41:14 +0000 (19:41 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/bench_pthreadpool.c

index 4269b5360f89c9cc42050e869dcf83a785f58d58..3d581e9e5b6ab729172e28c7c8bcec9f3e6df199 100644 (file)
@@ -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);
 }