X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_rotation.c;h=2dd3cae2d0599609a1b7c74bbfc85d785f1377f8;hb=a7e618379e42b1a87798754c65844668b99ac645;hp=ce69d34e1939f538f3fdce94092260687c7af0c5;hpb=1de32e68e004074db759a50c6cd878ddb42a7209;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_rotation.c b/src/bin/lttng/commands/enable_rotation.c index ce69d34e1..2dd3cae2d 100644 --- a/src/bin/lttng/commands/enable_rotation.c +++ b/src/bin/lttng/commands/enable_rotation.c @@ -179,6 +179,10 @@ int cmd_enable_rotation(int argc, const char **argv) } while ((opt = poptGetNextOpt(pc)) != -1) { + if (opt_arg) { + free(opt_arg); + opt_arg = NULL; + } switch (opt) { case OPT_HELP: SHOW_HELP(); @@ -333,6 +337,7 @@ end: if (free_session_name) { free(session_name); } + free(opt_arg); return cmd_ret; error: