tracing/filter: Free pred array on disabling of filter
authorSteven Rostedt <srostedt@redhat.com>
Fri, 28 Jan 2011 03:53:06 +0000 (22:53 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 8 Feb 2011 01:56:18 +0000 (20:56 -0500)
When a filter is disabled, free the preds.

Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c

index b6c910642a1edcfdf9ff3c88ecfc9e14a7f3f7ad..2f5458e244a3a9e2721475570d5fbc9e1b6bf32b 100644 (file)
@@ -1388,6 +1388,10 @@ int apply_event_filter(struct ftrace_event_call *call, char *filter_string)
 
        if (!strcmp(strstrip(filter_string), "0")) {
                filter_disable_preds(call);
+               reset_preds(call->filter);
+               /* Make sure the filter is not being used */
+               synchronize_sched();
+               __free_preds(call->filter);
                remove_filter_string(call->filter);
                goto out_unlock;
        }