summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-05-27 05:04:48 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2009-06-02 01:18:03 +0200
commite16228069083a2f6b94383ac5739aea7a0f38ce4 (patch)
tree97bf6074fff3ea29daa732f92d29472cf803165a /kernel/trace
parenttracing/stat: change dummpy_cmp() to return -1 (diff)
downloadlinux-e16228069083a2f6b94383ac5739aea7a0f38ce4.tar.xz
linux-e16228069083a2f6b94383ac5739aea7a0f38ce4.zip
tracing/stat: remember to free root node
When closing a trace_stat file, we destroy the rbtree constructed during file open, but there is memory leak that the root node is not freed. [ Impact: fix memory leak when closing a trace_stat file ] Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index 5816d1aebcc9..8030ec98dbad 100644
--- a/kernel/trace/trace_stat.c
+++ b/kernel/trace/trace_stat.c
@@ -60,8 +60,8 @@ static struct rb_node *release_next(struct rb_node *node)
return node->rb_right;
else {
if (!parent)
- return NULL;
- if (parent->rb_left == node)
+ ;
+ else if (parent->rb_left == node)
parent->rb_left = NULL;
else
parent->rb_right = NULL;