X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng%2Fcommands%2Fdestroy.c;h=1eca989e6cdd6e826b28f452dd1bbdb1209073af;hb=82a3637f639486c07ff937ab03e1e9532379d26a;hp=d7c01097fdf8d03e029102bc03813112a4069c6d;hpb=da561c94285dbd2079662ae8982a7aecac9b245b;p=lttng-tools.git diff --git a/lttng/commands/destroy.c b/lttng/commands/destroy.c index d7c01097f..1eca989e6 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 @@ -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; }