diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-09 09:23:27 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-09 10:19:18 +0100 |
commit | 9df3069083cd49f75e0ec54fc1e699b057129934 (patch) | |
tree | 39edaf54976777bf74dd4ca99a9a053ebdc7e430 | |
parent | 2c8d6f5c90d5be62b48ba2881f2a6631091dc5af (diff) | |
download | lvm2-9df3069083cd49f75e0ec54fc1e699b057129934.tar.gz |
clvmd: check for pthread_create status
Coverity: likes to see checked function result.
-rw-r--r-- | daemons/clvmd/clvmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 53daa8cc7..96cb69775 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -604,7 +604,10 @@ int main(int argc, char *argv[]) local_client_head.fd, &local_client_head, newfd->fd, newfd); /* Don't let anyone else to do work until we are started */ - pthread_create(&lvm_thread, &stack_attr, lvm_thread_fn, &lvm_params); + if (pthread_create(&lvm_thread, &stack_attr, lvm_thread_fn, &lvm_params)) { + log_sys_error("pthread_create", ""); + goto out; + } /* Don't start until the LVM thread is ready */ pthread_barrier_wait(&lvm_start_barrier); |