X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng%2Fcommands%2Fdestroy.c;h=516f8ab9521a539c6ed109be40476640df6730df;hb=617d7d159c22a17dd0191597945eb00303935e96;hp=d7c01097fdf8d03e029102bc03813112a4069c6d;hpb=da561c94285dbd2079662ae8982a7aecac9b245b;p=lttng-tools.git diff --git a/lttng/commands/destroy.c b/lttng/commands/destroy.c index d7c01097f..516f8ab95 100644 --- a/lttng/commands/destroy.c +++ b/lttng/commands/destroy.c @@ -3,8 +3,8 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * as published by the Free Software Foundation; only version 2 + * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_session_name; @@ -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; }