From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:51386 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753651AbcESESX (ORCPT ); Thu, 19 May 2016 00:18:23 -0400 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: "Steven Rostedt (Red Hat)" , Andrew Morton , Jiri Olsa , Namhyung Kim , Arnaldo Carvalho de Melo , Sasha Levin Subject: [added to the 3.18 stable tree] tools lib traceevent: Free filter tokens in process_filter() Date: Thu, 19 May 2016 00:15:43 -0400 Message-Id: <1463631350-32182-54-git-send-email-sasha.levin@oracle.com> In-Reply-To: <1463631350-32182-1-git-send-email-sasha.levin@oracle.com> References: <1463631350-32182-1-git-send-email-sasha.levin@oracle.com> Sender: stable-owner@vger.kernel.org List-ID: From: "Steven Rostedt (Red Hat)" This patch has been added to the 3.18 stable tree. If you have any objections, please let us know. =============== [ Upstream commit e1644aae4589274223c1ab9072ddbda98dd97f6a ] valgrind showed that the filter token wasn't being freed properly in process_filter(). Signed-off-by: Steven Rostedt Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20150324135923.817723903@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- 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.5.0