Fix: dereference on NULL pointer on allocation failure
[lttng-tools.git] / src / bin / lttng-sessiond / health.c
index e8c42e4bd7fa6f2b8b7394e9af43461be4b26fb4..921b45261846cb79d62b71d13503478ce10d240c 100644 (file)
@@ -265,7 +265,7 @@ bool launch_health_management_thread(void)
 
        notifiers = zmalloc(sizeof(*notifiers));
        if (!notifiers) {
-               goto error;
+               goto error_alloc;
        }
 
        sem_init(&notifiers->ready, 0, 0);
@@ -287,5 +287,6 @@ bool launch_health_management_thread(void)
        return true;
 error:
        cleanup_health_management_thread(notifiers);
+error_alloc:
        return false;
 }
This page took 0.023675 seconds and 5 git commands to generate.