From: Mathieu Desnoyers Date: Thu, 3 Sep 2015 03:01:21 +0000 (-0400) Subject: Fix: Double unlock on error path X-Git-Tag: v2.7.0-rc2~105 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a028f24c774ffb526185a915063e1de59fb43cc5;p=lttng-tools.git Fix: Double unlock on error path Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/ust-consumer.c b/src/bin/lttng-sessiond/ust-consumer.c index ad076e3c3..ba464d9b7 100644 --- a/src/bin/lttng-sessiond/ust-consumer.c +++ b/src/bin/lttng-sessiond/ust-consumer.c @@ -245,14 +245,13 @@ int ust_consumer_ask_channel(struct ust_app_session *ua_sess, } pthread_mutex_lock(socket->lock); - ret = ask_channel_creation(ua_sess, ua_chan, consumer, socket, registry); + pthread_mutex_unlock(socket->lock); if (ret < 0) { goto error; } error: - pthread_mutex_unlock(socket->lock); return ret; }