From ab8f7245ba13d770ecc71d8624160c0e9429a616 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 14 Dec 2018 15:36:20 -0500 Subject: [PATCH] Fix: destroy called twice on quit pipe MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A consumer management thread can be launched successsfully and yet still report an error encoutered during its initialization. If such an error occurs, the cleanup function is invoked explicitly in the error path and will be called again when the last reference to the thread is released. Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/manage-consumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/manage-consumer.c b/src/bin/lttng-sessiond/manage-consumer.c index 68c7d649b..b710c61f8 100644 --- a/src/bin/lttng-sessiond/manage-consumer.c +++ b/src/bin/lttng-sessiond/manage-consumer.c @@ -471,7 +471,7 @@ bool launch_consumer_management_thread(struct consumer_data *consumer_data) wait_until_thread_is_ready(notifiers); lttng_thread_put(thread); if (notifiers->initialization_result) { - goto error; + return false; } return true; error: -- 2.34.1