Fix: sessiond: NULL thread_state provided to pthread_cleanup callback
[lttng-tools.git] / src / bin / lttng-sessiond / register.c
index c7e3de66ff1f22ac378731b8228f10b84634a30f..464b89459f7f6f7bc4880fa698d38188f83783ec 100644 (file)
@@ -175,7 +175,7 @@ static void *thread_application_registration(void *data)
 
        DBG("[thread] Manage application registration started");
 
-       pthread_cleanup_push(thread_init_cleanup, NULL);
+       pthread_cleanup_push(thread_init_cleanup, thread_state);
        health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_REG);
 
        ret = lttcomm_listen_unix_sock(application_socket);
@@ -278,6 +278,7 @@ static void *thread_application_registration(void *data)
                                                if (ret) {
                                                        PERROR("close");
                                                }
+                                               sock = -1;
                                                goto error;
                                        }
 
This page took 0.023597 seconds and 4 git commands to generate.