summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-01-06 15:52:11 +0100
committerDavid Sterba <dsterba@suse.com>2016-01-12 15:02:51 +0100
commitb98ad87a037c053da533d7d9929583b9ea42c86c (patch)
tree8aa69ad1f5457ab79b5ff62c48d5adf3f5f92e44 /ctree.c
parentef45c6b9db20bd4aa9cd0bb6f3f05cec41e21f96 (diff)
btrfs-progs: catch memory allocation failure in btrfs_split_item
Do the dumb BUG_ON now, the function needs more changes to handle all errors. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctree.c b/ctree.c
index 46153e35..04cc476e 100644
--- a/ctree.c
+++ b/ctree.c
@@ -2243,6 +2243,7 @@ split:
buf = kmalloc(item_size, GFP_NOFS);
+ BUG_ON(!buf);
read_extent_buffer(leaf, buf, btrfs_item_ptr_offset(leaf,
path->slots[0]), item_size);
slot = path->slots[0] + 1;