summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-11-09 09:23:27 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2015-11-09 10:19:18 +0100
commit9df3069083cd49f75e0ec54fc1e699b057129934 (patch)
tree39edaf54976777bf74dd4ca99a9a053ebdc7e430
parent2c8d6f5c90d5be62b48ba2881f2a6631091dc5af (diff)
downloadlvm2-9df3069083cd49f75e0ec54fc1e699b057129934.tar.gz
clvmd: check for pthread_create status
Coverity: likes to see checked function result.
-rw-r--r--daemons/clvmd/clvmd.c5
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);