From 9facffb38faa01da0d1ba9574f9cc1c47b1deb2e Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 10 Jan 2010 04:25:16 +0100 Subject: [PATCH] btr_node_status(): Do not segfault if btrn is NULL. --- buffer_tree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buffer_tree.c b/buffer_tree.c index d12dcde7..a7a3220b 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -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; -- 2.39.5