diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-10-13 01:28:57 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-13 06:05:17 (GMT) |
commit | 8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab (patch) | |
tree | 2e2d934ae03cc7e567b35bbca0de58e105a3b6b6 /kernel/trace | |
parent | a813a159766ee9d36aa1fc717c60d63325a6d077 (diff) | |
download | linux-fsl-qoriq-8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab.tar.xz |
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@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: <stable@kernel.org> # for v2.6.31.x
LKML-Reference: <4AD3D7D9.4070400@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | 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); } } |