X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_trigger.cpp;h=8619a822161eda44fbe2f61aceb7dedae8c07781;hb=3957512ed31ca945f8353d5812f317314c905640;hp=acaa50c7dfff3bfb183651e3f33c5c6e33f325bc;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_trigger.cpp b/src/bin/lttng/commands/add_trigger.cpp index acaa50c7d..8619a8221 100644 --- a/src/bin/lttng/commands/add_trigger.cpp +++ b/src/bin/lttng/commands/add_trigger.cpp @@ -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[] = {