提交 e1622806 编写于 作者: L Li Zefan 提交者: Frederic Weisbecker

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: NLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
上级 b3dd7ba7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册