X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_rotation.cpp;h=1b79da148065b6f0ace1d3d9eaebb8676f8239b7;hb=504021487aa32ab2808d8a483acca552159f5f52;hp=0210f9cb6e9b18b41cc879316d9296bb80bd2c84;hpb=48a4000561343808724f7cb5fa8c131877489ccd;p=lttng-tools.git diff --git a/src/bin/lttng/commands/enable_rotation.cpp b/src/bin/lttng/commands/enable_rotation.cpp index 0210f9cb6..1b79da148 100644 --- a/src/bin/lttng/commands/enable_rotation.cpp +++ b/src/bin/lttng/commands/enable_rotation.cpp @@ -16,11 +16,11 @@ #include #include -#include -#include -#include +#include +#include +#include -#include "../command.h" +#include "../command.hpp" #include static char *opt_session_name; @@ -50,8 +50,8 @@ static struct poptOption long_options[] = { }; static const char *schedule_type_str[] = { - "periodic", "size-based", + "periodic", }; static enum cmd_error_code add_schedule(const char *session_name, @@ -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 = nullptr; + } 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: