Fix: Double unlock on error path
[lttng-tools.git] / src / bin / lttng-sessiond / ust-consumer.c
index ad076e3c3173085f922c3d7864d9959bb9c93c9c..ba464d9b7d90c8b1a318c527eefaf7f5032b2b02 100644 (file)
@@ -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;
 }
 
This page took 0.023011 seconds and 4 git commands to generate.