Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Steven Rostedt (Red Hat) and committed by
Arnaldo Carvalho de Melo
e1644aae 82ac952b

+2
+2
tools/lib/traceevent/parse-filter.c
··· 1058 1058 *parg = current_op; 1059 1059 else 1060 1060 *parg = current_exp; 1061 + free(token); 1061 1062 return PEVENT_ERRNO__UNBALANCED_PAREN; 1062 1063 } 1063 1064 break; ··· 1169 1168 1170 1169 *parg = current_op; 1171 1170 1171 + free(token); 1172 1172 return 0; 1173 1173 1174 1174 fail_alloc: