From 2898de39cf552fdc0bc42575997b3885eee091a7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 2 Sep 2015 23:01:21 -0400 Subject: [PATCH] Fix: Double unlock on error path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-consumer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.34.1