lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 9/9] tools lib traceevent: Free filter tokens in process_filter()
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

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

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
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 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,
*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.1.4



\
 
 \ /
  Last update: 2015-03-24 15:21    [W:0.141 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site