mirror of https://gitee.com/openkylin/linux.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 <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>
This commit is contained in:
parent
1fc2d5c119
commit
09f1f245c7
|
@ -516,6 +516,7 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
|
||||||
|
|
||||||
if (pred->clear) {
|
if (pred->clear) {
|
||||||
filter_free_preds(call);
|
filter_free_preds(call);
|
||||||
|
filter_free_pred(pred);
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,6 +582,7 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
|
||||||
|
|
||||||
if (pred->clear) {
|
if (pred->clear) {
|
||||||
filter_free_subsystem_preds(system);
|
filter_free_subsystem_preds(system);
|
||||||
|
filter_free_pred(pred);
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue