mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
tracing: Fix memory leak on instance deletion
When an instance is created, it also gets a snapshot ring buffer allocated (with minimum of pages). But when it is deleted the snapshot buffer is not. There was a helper function added to match the allocation of these ring buffers to a way to free them, but it wasn't used by the deletion of an instance. Using that helper function solves this memory leak. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
23aaa3c18e
commit
a9fcaaac37
1 changed files with 1 additions and 2 deletions
|
@ -6349,8 +6349,7 @@ static int instance_delete(const char *name)
|
||||||
event_trace_del_tracer(tr);
|
event_trace_del_tracer(tr);
|
||||||
ftrace_destroy_function_files(tr);
|
ftrace_destroy_function_files(tr);
|
||||||
debugfs_remove_recursive(tr->dir);
|
debugfs_remove_recursive(tr->dir);
|
||||||
free_percpu(tr->trace_buffer.data);
|
free_trace_buffers(tr);
|
||||||
ring_buffer_free(tr->trace_buffer.buffer);
|
|
||||||
|
|
||||||
kfree(tr->name);
|
kfree(tr->name);
|
||||||
kfree(tr);
|
kfree(tr);
|
||||||
|
|
Loading…
Reference in a new issue