X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Fcommands%2Fdestroy.c;fp=lttng%2Fcommands%2Fdestroy.c;h=743d899786a637b58b7b773012832c4426708707;hp=d7c01097fdf8d03e029102bc03813112a4069c6d;hb=b73d0b29491b7d0dc5cde3c4c65a6cd7c80479b4;hpb=b58c70aeb7e3742eb09863475722468fab12044b diff --git a/lttng/commands/destroy.c b/lttng/commands/destroy.c index d7c01097f..743d89978 100644 --- a/lttng/commands/destroy.c +++ b/lttng/commands/destroy.c @@ -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; }