summaryrefslogtreecommitdiffstats
path: root/kernel/tools/lib
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/lib')
-rw-r--r--kernel/tools/lib/traceevent/parse-filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/tools/lib/traceevent/parse-filter.c b/kernel/tools/lib/traceevent/parse-filter.c
index 0144b3d1b..88cccea3c 100644
--- a/kernel/tools/lib/traceevent/parse-filter.c
+++ b/kernel/tools/lib/traceevent/parse-filter.c
@@ -1164,11 +1164,11 @@ process_filter(struct event_format *event, struct filter_arg **parg,
current_op = current_exp;
ret = collapse_tree(current_op, parg, error_str);
+ /* collapse_tree() may free current_op, and updates parg accordingly */
+ current_op = NULL;
if (ret < 0)
goto fail;
- *parg = current_op;
-
free(token);
return 0;