#include <inttypes.h>
#include <ctype.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/mi-lttng.h>
-#include <common/utils.h>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/mi-lttng.hpp>
+#include <common/utils.hpp>
-#include "../command.h"
+#include "../command.hpp"
#include <lttng/lttng.h>
static char *opt_session_name;
}
while ((opt = poptGetNextOpt(pc)) != -1) {
+ if (opt_arg) {
+ free(opt_arg);
+ opt_arg = nullptr;
+ }
switch (opt) {
case OPT_HELP:
SHOW_HELP();
if (free_session_name) {
free(session_name);
}
+ free(opt_arg);
return cmd_ret;
error: