Fix: Double unlock on error path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 3 Sep 2015 03:01:21 +0000 (23:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 24 Sep 2015 01:50:15 +0000 (21:50 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-consumer.c

index 75d7170d2752f4d952d8d8a69bd27eed0243d565..fee57d205cbc3d2b5d86224563ca96bf2080a8cf 100644 (file)
@@ -224,14 +224,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;
 }
 
This page took 0.026318 seconds and 4 git commands to generate.