From cb2b8b19c83ddb168b69307c4a68c2a2d39f2a5f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 6 Jan 2016 15:52:11 +0100 Subject: 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 --- cmds-check.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds-check.c') diff --git a/cmds-check.c b/cmds-check.c index 224bec06..bc594d57 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -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; -- cgit v1.2.3