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-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=bd3739b081f96057a93a234e6ac1c98a9a44ca39;hp=c8e0c5f5d94fb574f4e5d7518f0f8e6f984dfe3d 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: