X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=lttng%2Fcommands%2Fstop.c;h=664637873f6c980ee22499192317f25aeeca1ac2;hb=f05b5f07dd61554a2fcdc5a09d4d80cadf478a51;hp=0245296a444790a39c4a0e6a405b190397512739;hpb=f3ed775ef4842019b396f06095b053c3a70bc3c8;p=lttng-tools.git diff --git a/lttng/commands/stop.c b/lttng/commands/stop.c index 0245296a4..664637873 100644 --- a/lttng/commands/stop.c +++ b/lttng/commands/stop.c @@ -26,7 +26,7 @@ #include #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; }