aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/lib/traceevent/event-parse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index fcd8a9e3d2e1..5c1867a13ef2 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -1745,6 +1745,9 @@ process_cond(struct event_format *event, struct print_arg *top, char **tok)
1745 type = process_arg(event, left, &token); 1745 type = process_arg(event, left, &token);
1746 1746
1747 again: 1747 again:
1748 if (type == EVENT_ERROR)
1749 goto out_free;
1750
1748 /* Handle other operations in the arguments */ 1751 /* Handle other operations in the arguments */
1749 if (type == EVENT_OP && strcmp(token, ":") != 0) { 1752 if (type == EVENT_OP && strcmp(token, ":") != 0) {
1750 type = process_op(event, left, &token); 1753 type = process_op(event, left, &token);
@@ -2004,6 +2007,12 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
2004 goto out_warn_free; 2007 goto out_warn_free;
2005 2008
2006 type = process_arg_token(event, right, tok, type); 2009 type = process_arg_token(event, right, tok, type);
2010 if (type == EVENT_ERROR) {
2011 free_arg(right);
2012 /* token was freed in process_arg_token() via *tok */
2013 token = NULL;
2014 goto out_free;
2015 }
2007 2016
2008 if (right->type == PRINT_OP && 2017 if (right->type == PRINT_OP &&
2009 get_op_prio(arg->op.op) < get_op_prio(right->op.op)) { 2018 get_op_prio(arg->op.op) < get_op_prio(right->op.op)) {