3.19.8-ckt22 -stable review patch.  If anyone has any objections, please let me 
know.

---8<------------------------------------------------------------

From: "Steven Rostedt (Red Hat)" <[email protected]>

commit e1644aae4589274223c1ab9072ddbda98dd97f6a upstream.

valgrind showed that the filter token wasn't being freed properly in
process_filter().

Signed-off-by: Steven Rostedt <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
---
 tools/lib/traceevent/parse-filter.c | 2 ++
 1 file changed, 2 insertions(+)

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:
-- 
2.7.4

Reply via email to