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>
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;