diff options
author | David Sterba <dsterba@suse.com> | 2016-01-06 15:52:11 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-12 15:02:50 +0100 |
commit | cb2b8b19c83ddb168b69307c4a68c2a2d39f2a5f (patch) | |
tree | c8ee4ba18de64dd1eb09e98a1d480902153f655c /cmds-check.c | |
parent | b317ca97d3f6c2b2ef23b051d304c7f03e3c23f1 (diff) | |
download | btrfs-progs-cb2b8b19c83ddb168b69307c4a68c2a2d39f2a5f.tar.gz |
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>
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-check.c b/cmds-check.c index 224bec0..bc594d5 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; |