From: Steven Rostedt (Red Hat) Date: Tue, 24 Mar 2015 13:57:57 +0000 (-0400) Subject: tools lib traceevent: Free filter tokens in process_filter() X-Git-Tag: v4.14-rc1~5434^2~68^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1644aae4589274223c1ab9072ddbda98dd97f6a;p=platform%2Fkernel%2Flinux-rpi.git tools lib traceevent: Free filter tokens in process_filter() valgrind showed that the filter token wasn't being freed properly in process_filter(). Signed-off-by: Steven Rostedt Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20150324135923.817723903@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index b502344..0144b3d 100644 --- a/tools/lib/traceevent/parse-filter.c +++ b/tools/lib/traceevent/parse-filter.c @@ -1058,6 +1058,7 @@ process_filter(struct event_format *event, struct filter_arg **parg, *parg = current_op; else *parg = current_exp; + free(token); return PEVENT_ERRNO__UNBALANCED_PAREN; } break; @@ -1168,6 +1169,7 @@ process_filter(struct event_format *event, struct filter_arg **parg, *parg = current_op; + free(token); return 0; fail_alloc: