Cleanup: lttng: remove unused 'session_name' variable
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.cpp
index acaa50c7dfff3bfb183651e3f33c5c6e33f325bc..8619a822161eda44fbe2f61aceb7dedae8c07781 100644 (file)
@@ -640,6 +640,7 @@ void destroy_event_expr(void *ptr)
        lttng_event_expr_destroy((lttng_event_expr *) ptr);
 }
 
+namespace {
 struct parse_event_rule_res {
        /* Owned by this. */
        struct lttng_event_rule *er;
@@ -647,6 +648,7 @@ struct parse_event_rule_res {
        /* Array of `struct lttng_event_expr *` */
        struct lttng_dynamic_pointer_array capture_descriptors;
 };
+} /* namespace */
 
 static
 struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv,
@@ -787,6 +789,8 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv,
 
                                event_expr = ir_op_root_to_event_expr(
                                                parser_ctx->ir_root, arg);
+                               filter_parser_ctx_free(parser_ctx);
+                               parser_ctx = nullptr;
                                if (!event_expr) {
                                        /*
                                         * ir_op_root_to_event_expr has printed
@@ -1404,11 +1408,13 @@ end:
        return c;
 }
 
+namespace {
 struct condition_descr {
        const char *name;
        struct lttng_condition *(*handler) (int *argc, const char ***argv,
                int argc_offset);
 };
+} /* namespace */
 
 static const
 struct condition_descr condition_descrs[] = {
@@ -2099,11 +2105,13 @@ end:
        return action;
 }
 
+namespace {
 struct action_descr {
        const char *name;
        struct lttng_action *(*handler) (int *argc, const char ***argv,
                int argc_offset);
 };
+} /* namespace */
 
 static const
 struct action_descr action_descrs[] = {
This page took 0.023111 seconds and 4 git commands to generate.