From: Jérémie Galarneau Date: Fri, 14 Dec 2018 20:36:20 +0000 (-0500) Subject: Fix: destroy called twice on quit pipe X-Git-Tag: v2.12.0-rc1~653 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bd3739b081f96057a93a234e6ac1c98a9a44ca39;p=lttng-tools.git Fix: destroy called twice on quit pipe 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 --- 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: