Skip to content

Commit

Permalink
tracing/filters: free pred when clearing filters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Zanussi authored and Ingo Molnar committed Mar 24, 2009
1 parent 1fc2d5c commit 09f1f24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 09f1f24

Please sign in to comment.