mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-05 04:59:35 +00:00
btrfs-progs: handler memory allocation failure in add_extent_rec
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
87296b5541
commit
ef45c6b9db
@ -4586,6 +4586,8 @@ static int add_extent_rec(struct cache_tree *extent_cache,
|
||||
return ret;
|
||||
}
|
||||
rec = malloc(sizeof(*rec));
|
||||
if (!rec)
|
||||
return -ENOMEM;
|
||||
rec->start = start;
|
||||
rec->max_size = max_size;
|
||||
rec->nr = max(nr, max_size);
|
||||
|
Loading…
Reference in New Issue
Block a user