diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-16 04:39:12 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-06-16 16:25:35 -0400 |
commit | 57be88878e7aa38750384704d811485a607bbda4 (patch) | |
tree | e65873cc622b7477ec6cf7ef7be8f63f4aef481f /kernel | |
parent | fa7439531dee58277748c819785a44d3203c4b51 (diff) |
tracing/filters: free filter_string in destroy_preds()
filter->filter_string is not freed when unloading a module:
# insmod trace-events-sample.ko
# echo "bar < 100" > /mnt/tracing/events/sample/foo_bar/filter
# rmmod trace-events-sample.ko
[ Impact: fix memory leak when unloading module ]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A375A30.9060802@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index b24ab0e6ea74..d9f01c1a042b 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -381,6 +381,7 @@ void destroy_preds(struct ftrace_event_call *call) | |||
381 | filter_free_pred(filter->preds[i]); | 381 | filter_free_pred(filter->preds[i]); |
382 | } | 382 | } |
383 | kfree(filter->preds); | 383 | kfree(filter->preds); |
384 | kfree(filter->filter_string); | ||
384 | kfree(filter); | 385 | kfree(filter); |
385 | call->filter = NULL; | 386 | call->filter = NULL; |
386 | } | 387 | } |