Fix: use error code path instead of break when errors happen before execl
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 0df0b1f2e04bc4601149088740b6feec2b0bfdb2..80ca3d7c04e42704a325bb8b2aedfee1db0d7837 100644 (file)
@@ -1868,12 +1868,16 @@ static void *thread_dispatch_ust_registration(void *data)
 
        DBG("[thread] Dispatch UST command started");
 
-       while (!CMM_LOAD_SHARED(dispatch_thread_exit)) {
+       for (;;) {
                health_code_update();
 
                /* Atomically prepare the queue futex */
                futex_nto1_prepare(&ust_cmd_queue.futex);
 
+               if (CMM_LOAD_SHARED(dispatch_thread_exit)) {
+                       break;
+               }
+
                do {
                        struct ust_app *app = NULL;
                        ust_cmd = NULL;
@@ -2522,7 +2526,7 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data)
                        } else {
                                DBG("Could not find any valid consumerd executable");
                                ret = -EINVAL;
-                               break;
+                               goto error;
                        }
                        DBG("Using kernel consumer at: %s",  consumer_to_use);
                        ret = execl(consumer_to_use,
This page took 0.02406 seconds and 4 git commands to generate.