From: Tom Zanussi Date: Tue, 24 Mar 2009 07:14:11 +0000 (-0500) Subject: tracing/filters: free pred when clearing filters X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=09f1f245c79585383de63e3ca54d0f91824bff3a;p=linux-2.6-omap-h63xx.git tracing/filters: free pred when clearing filters 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 Cc: Steven Rostedt Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Weisbecker LKML-Reference: <1237878851.8339.58.camel@charm-linux> Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index fdab30d6c83..a9381384aa9 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -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; }