nsswitch: Fix CID 1441070 Error handling issues (CHECKED_RETURN)
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Fri, 9 Nov 2018 08:01:29 +0000 (09:01 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 9 Nov 2018 21:42:27 +0000 (22:42 +0100)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
nsswitch/stress-nss-libwbclient.c

index 740ad0e90fa131fb67fad748d3e488a5bd0a4dfb..df1d85c9c40239369965206504637e1f68da2a4a 100644 (file)
@@ -149,7 +149,14 @@ int main(int argc, char *argv[])
 
        /* wait for query threads to terminate */
        for (n = 0; n < 2; n++) {
-               pthread_join(threads[n], NULL);
+               rc = pthread_join(threads[n], NULL);
+               if (rc != 0) {
+                       fprintf(stderr,
+                               "joining query thread %i failed: %s\n",
+                               n,
+                               strerror(rc));
+                       exit(1);
+               }
        }
 
        fprintf(state.fail ? stderr: stdout,