btrfs-progs: catch memory allocation failure in splice_shared_node

Do the dumb BUG_ON now, the function needs more changes to handle all
errors.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-01-06 15:52:11 +01:00
parent b317ca97d3
commit cb2b8b19c8

View File

@ -1128,6 +1128,7 @@ again:
ins = node;
} else {
ins = malloc(sizeof(*ins));
BUG_ON(!ins);
ins->cache.start = node->cache.start;
ins->cache.size = node->cache.size;
ins->data = rec;