From: Andre Noll Date: Sat, 7 Apr 2012 22:30:23 +0000 (+0200) Subject: btr_slice_out_node(): Set parent to NULL. X-Git-Tag: v0.4.11~24 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=6b28eee0756dff0e5dae8d2c1292a0be097706dd;p=paraslash.git btr_slice_out_node(): Set parent to NULL. Without this, a subsequent btr_remove_node() on the spliced out node could segfault. --- diff --git a/buffer_tree.c b/buffer_tree.c index 08892b4b..7d79636f 100644 --- 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; } /**