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 d12dcde..a7a3220 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;