lttng command line UI: fix allocation/free
[lttng-tools.git] / lttng / commands / start.c
index 3a4febe4f86bf7099b9df6d98ae2f8cf1ba8729d..e9423170e8773e2a99dd6544f8efe0ad0719aeaf 100644 (file)
@@ -26,7 +26,7 @@
 #include <unistd.h>
 
 #include "cmd.h"
-#include "config.h"
+#include "conf.h"
 #include "utils.h"
 
 static char *opt_session_name;
@@ -85,7 +85,9 @@ static int start_tracing(void)
        MSG("Tracing started for session %s", session_name);
 
 free_name:
-       free(session_name);
+       if (opt_session_name == NULL) {
+               free(session_name);
+       }
 error:
        return ret;
 }
This page took 0.024407 seconds and 4 git commands to generate.