Fix: lttng: add-trigger: leak of parser context on capture
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.c
index 4395c182b42db5f528dda42f65de46e48984304d..6bacd0f5171b3c30c2931c8cce1a0ee4d8304198 100644 (file)
@@ -355,7 +355,7 @@ static int parse_kernel_probe_opts(const char *source,
                        PERROR("Failed to copy kernel probe location symbol name.");
                        goto error;
                }
-               offset = strtoul(s_hex, NULL, 0);
+               offset = strtoull(s_hex, NULL, 0);
 
                *location = lttng_kernel_probe_location_symbol_create(
                                symbol_name, offset);
@@ -401,7 +401,7 @@ static int parse_kernel_probe_opts(const char *source,
                        goto error;
                }
 
-               address = strtoul(s_hex, NULL, 0);
+               address = strtoull(s_hex, NULL, 0);
                *location = lttng_kernel_probe_location_address_create(address);
                if (!*location) {
                        ERR("Failed to create symbol kernel probe location.");
@@ -787,6 +787,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 = NULL;
                                if (!event_expr) {
                                        /*
                                         * ir_op_root_to_event_expr has printed
This page took 0.025267 seconds and 5 git commands to generate.