lttng command line UI: fix allocation/free
[lttng-tools.git] / lttng / commands / destroy.c
index d7c01097fdf8d03e029102bc03813112a4069c6d..743d899786a637b58b7b773012832c4426708707 100644 (file)
@@ -97,7 +97,9 @@ static int destroy_session()
        ret = CMD_SUCCESS;
 
 free_name:
-       free(session_name);
+       if (opt_session_name == NULL) {
+               free(session_name);
+       }
 error:
        return ret;
 }
This page took 0.02403 seconds and 4 git commands to generate.