#include <inttypes.h>
#include <ctype.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/utils.h>
-#include <common/mi-lttng.h>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/utils.hpp>
+#include <common/mi-lttng.hpp>
-#include <lttng/domain-internal.h>
+#include <lttng/domain-internal.hpp>
-#include "../command.h"
-#include "../utils.h"
+#include "../command.hpp"
+#include "../utils.hpp"
static struct lttng_channel chan_opts;
ret = CMD_UNDEFINED;
goto end;
}
+
+ if (opt_arg) {
+ free(opt_arg);
+ opt_arg = nullptr;
+ }
}
ret = print_missing_or_multiple_domains(
/* Overwrite ret if an error occurred when enable_channel */
ret = command_ret ? command_ret : ret;
poptFreeContext(pc);
+ free(opt_arg);
return ret;
}