lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ring-buffer: Fix memleak in ring_buffer_free()
I noticed oprofile memleaked in linux-2.6 current tree,
and tracked this ring-buffer leak.

This is a stable candidate.

[PATCH] ring-buffer: Fix memleak in ring_buffer_free()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index bf27bb7..c1d874e 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -735,6 +735,7 @@ ring_buffer_free(struct ring_buffer *buffer)

put_online_cpus();

+ kfree(buffer->buffers);
free_cpumask_var(buffer->cpumask);

kfree(buffer);

\
 
 \ /
  Last update: 2009-08-07 12:53    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site