projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c48df6b
)
btr_slice_out_node(): Set parent to NULL.
author
Andre Noll
<maan@systemlinux.org>
Sat, 7 Apr 2012 22:30:23 +0000
(
00:30
+0200)
committer
Andre Noll
<maan@systemlinux.org>
Mon, 9 Apr 2012 20:13:05 +0000
(22:13 +0200)
Without this, a subsequent btr_remove_node() on the spliced
out node could segfault.
buffer_tree.c
patch
|
blob
|
history
diff --git
a/buffer_tree.c
b/buffer_tree.c
index 08892b4b4b4b31b8985f58d707197bc527987435..7d79636fac717f4e4cb8559dec698f8204eed34c 100644
(file)
--- a/
buffer_tree.c
+++ b/
buffer_tree.c
@@
-825,6
+825,7
@@
void btr_splice_out_node(struct btr_node *btrn)
list_move(&ch->node, &btrn->parent->children);
}
assert(list_empty(&btrn->children));
+ btrn->parent = NULL;
}
/**