lttng command line UI: fix allocation/free
[lttng-tools.git] / lttng / commands / stop.c
index 0245296a444790a39c4a0e6a405b190397512739..664637873f6c980ee22499192317f25aeeca1ac2 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;
@@ -83,7 +83,9 @@ static int stop_tracing(void)
        MSG("Tracing stopped 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.029452 seconds and 5 git commands to generate.