[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab@git.kernel.org>
Date: Tue, 13 Oct 2009 06:14:57 GMT
From: tip-bot for Li Zefan <lizf@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
tzanussi@...il.com, lizf@...fujitsu.com, fweisbec@...il.com,
rostedt@...dmis.org, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:tracing/urgent] tracing/filters: Fix memory leak when setting a filter
Commit-ID: 8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab
Gitweb: http://git.kernel.org/tip/8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab
Author: Li Zefan <lizf@...fujitsu.com>
AuthorDate: Tue, 13 Oct 2009 09:28:57 +0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 13 Oct 2009 08:05:17 +0200
tracing/filters: Fix memory leak when setting a filter
Every time we set a filter, we leak memory allocated by
postfix_append_operand() and postfix_append_op().
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Tom Zanussi <tzanussi@...il.com>
Cc: <stable@...nel.org> # for v2.6.31.x
LKML-Reference: <4AD3D7D9.4070400@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
kernel/trace/trace_events_filter.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 2324578..98a6cc5 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -933,8 +933,9 @@ static void postfix_clear(struct filter_parse_state *ps)
while (!list_empty(&ps->postfix)) {
elt = list_first_entry(&ps->postfix, struct postfix_elt, list);
- kfree(elt->operand);
list_del(&elt->list);
+ kfree(elt->operand);
+ kfree(elt);
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists