lttng command line UI: fix allocation/free
[lttng-tools.git] / lttng / commands / stop.c
index 56edc2d6de64010d6c701645d375d075bed645be..664637873f6c980ee22499192317f25aeeca1ac2 100644 (file)
@@ -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.022545 seconds and 4 git commands to generate.