]> git.tue.mpg.de Git - paraslash.git/commitdiff
btr_node_status(): Do not segfault if btrn is NULL.
authorAndre Noll <maan@systemlinux.org>
Sun, 10 Jan 2010 03:25:16 +0000 (04:25 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 10 Jan 2010 03:25:16 +0000 (04:25 +0100)
buffer_tree.c

index d12dcde7b5055b426f40ec116f0d5533213ef522..a7a3220b4d267955ae5fe467d9e08b1c48b6a5f3 100644 (file)
@@ -753,6 +753,8 @@ int btr_node_status(struct btr_node *btrn, size_t min_iqs,
 {
        size_t iqs;
 
+       if (!btrn)
+               return 0;
        if (type != BTR_NT_LEAF) {
                if (btr_no_children(btrn))
                        return -E_BTR_NO_CHILD;