diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-03-24 09:57:57 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-03-24 11:23:03 -0400 |
commit | e1644aae4589274223c1ab9072ddbda98dd97f6a (patch) | |
tree | 3cae8f46981667ffbd89bea8f1c35848f35d2600 /tools | |
parent | 82ac952be6348dc072dcfd80a2dcb511d0cd6bea (diff) |
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 <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150324135923.817723903@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/traceevent/parse-filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c index b50234402fc2..0144b3d1bb77 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, | |||
1058 | *parg = current_op; | 1058 | *parg = current_op; |
1059 | else | 1059 | else |
1060 | *parg = current_exp; | 1060 | *parg = current_exp; |
1061 | free(token); | ||
1061 | return PEVENT_ERRNO__UNBALANCED_PAREN; | 1062 | return PEVENT_ERRNO__UNBALANCED_PAREN; |
1062 | } | 1063 | } |
1063 | break; | 1064 | break; |
@@ -1168,6 +1169,7 @@ process_filter(struct event_format *event, struct filter_arg **parg, | |||
1168 | 1169 | ||
1169 | *parg = current_op; | 1170 | *parg = current_op; |
1170 | 1171 | ||
1172 | free(token); | ||
1171 | return 0; | 1173 | return 0; |
1172 | 1174 | ||
1173 | fail_alloc: | 1175 | fail_alloc: |