summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>2018-11-09 08:58:31 +0100
committerJeremy Allison <jra@samba.org>2018-11-09 22:42:27 +0100
commit9b30350489cdcd496fa08e5e1116ad3e19ca3ba3 (patch)
treecc37e21c5bc29abec2790cbc3f24bab1f22160a9 /nsswitch
parentb161b3a89154a9529404f5ee31d8679ddd1c48b0 (diff)
downloadsamba-9b30350489cdcd496fa08e5e1116ad3e19ca3ba3.tar.gz
nsswitch: Fix CID 1441072 Error handling issues (CHECKED_RETURN)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/stress-nss-libwbclient.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/nsswitch/stress-nss-libwbclient.c b/nsswitch/stress-nss-libwbclient.c
index cf85ff3f817..740ad0e90fa 100644
--- a/nsswitch/stress-nss-libwbclient.c
+++ b/nsswitch/stress-nss-libwbclient.c
@@ -118,7 +118,13 @@ int main(int argc, char *argv[])
state.username = argv[1];
state.timeout = time(NULL) + RUNTIME;
- pthread_mutex_init(&state.lock, NULL);
+ rc = pthread_mutex_init(&state.lock, NULL);
+ if (rc != 0) {
+ fprintf(stderr,
+ "pthread_mutex_init failed: %s\n",
+ strerror(rc));
+ exit(1);
+ }
state.fail = false;
state.nss_loop_count = 0;
state.wbc_loop_count = 0;