[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243528930-5318-3-git-send-email-fweisbec@gmail.com>
Date: Thu, 28 May 2009 18:42:09 +0200
From: Frederic Weisbecker <fweisbec@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: LKML <linux-kernel@...r.kernel.org>,
Li Zefan <lizf@...fujitsu.com>,
Steven Rostedt <rostedt@...dmis.org>,
Zhaolei <zhaolei@...fujitsu.com>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: [PATCH 2/3] tracing/stat: remember to free root node
From: Li Zefan <lizf@...fujitsu.com>
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@...fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
kernel/trace/trace_stat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c
index 8b7420a..a80d947 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;
--
1.6.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists