]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tools lib traceevent: Free filter tokens in process_filter()
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 24 Mar 2015 13:57:57 +0000 (09:57 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 24 Mar 2015 15:23:03 +0000 (12:23 -0300)
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>
tools/lib/traceevent/parse-filter.c

index b50234402fc2b368f39040a92ada39922f6464ee..0144b3d1bb77ac63441c77e1bb24e3405cfe3d8f 100644 (file)
@@ -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: