]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tracing/filters: free pred when clearing filters
authorTom Zanussi <tzanussi@gmail.com>
Tue, 24 Mar 2009 07:14:11 +0000 (02:14 -0500)
committerIngo Molnar <mingo@elte.hu>
Tue, 24 Mar 2009 07:26:51 +0000 (08:26 +0100)
Impact: fix (small) per trace filter modification memory leak

Free the current pred when clearing the filters via the filter files.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1237878851.8339.58.camel@charm-linux>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_events.c

index fdab30d6c835e9d87c011594cd550508fc093d97..a9381384aa9eb5e9702983805e079e285855eb23 100644 (file)
@@ -516,6 +516,7 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
 
        if (pred->clear) {
                filter_free_preds(call);
+               filter_free_pred(pred);
                return cnt;
        }
 
@@ -581,6 +582,7 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
 
        if (pred->clear) {
                filter_free_subsystem_preds(system);
+               filter_free_pred(pred);
                return cnt;
        }