mirror of https://gitee.com/openkylin/linux.git
tracing/filters: free filter_string in destroy_preds()
filter->filter_string is not freed when unloading a module: # insmod trace-events-sample.ko # echo "bar < 100" > /mnt/tracing/events/sample/foo_bar/filter # rmmod trace-events-sample.ko [ Impact: fix memory leak when unloading module ] Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4A375A30.9060802@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
fa7439531d
commit
57be88878e
|
@ -381,6 +381,7 @@ void destroy_preds(struct ftrace_event_call *call)
|
|||
filter_free_pred(filter->preds[i]);
|
||||
}
|
||||
kfree(filter->preds);
|
||||
kfree(filter->filter_string);
|
||||
kfree(filter);
|
||||
call->filter = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue