X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fthread.c;h=6eb5e8efb3124f67b7f1315c788162eaa67f31dd;hp=7e16b69ed9ca5ddb113875b87cb6fa7be64c48e0;hb=21fa020ee12d44632c5efde063869d542897bdd1;hpb=b0a23296344e57bd2e48e62ec2d7e0d8a38661bb diff --git a/src/bin/lttng-sessiond/thread.c b/src/bin/lttng-sessiond/thread.c index 7e16b69ed..6eb5e8efb 100644 --- a/src/bin/lttng-sessiond/thread.c +++ b/src/bin/lttng-sessiond/thread.c @@ -88,7 +88,7 @@ struct lttng_thread *lttng_thread_create(const char *name, thread = zmalloc(sizeof(*thread)); if (!thread) { - goto error; + goto error_alloc; } urcu_ref_init(&thread->ref); @@ -127,9 +127,9 @@ error_pthread_create: /* Release list reference. */ lttng_thread_put(thread); pthread_mutex_unlock(&thread_list.lock); -error: /* Release initial reference. */ lttng_thread_put(thread); +error_alloc: return NULL; }