diff options
author | David Sterba <dsterba@suse.com> | 2016-08-31 20:38:46 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-21 14:12:38 +0200 |
commit | 1ef93ea8632b89598d7723a04a2d268b70333168 (patch) | |
tree | 48e911e91131e2023534ae8dbd652d245a039f15 /volumes.c | |
parent | b318553f33dc59b6afdc7d264dcfbfe835ccc3d4 (diff) |
btrfs-progs: handle errors from btrfs_alloc_path
All functions already return an error condition, so the callers should
expect that.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -459,7 +459,8 @@ static int find_next_chunk(struct btrfs_root *root, u64 objectid, u64 *offset) struct btrfs_key found_key; path = btrfs_alloc_path(); - BUG_ON(!path); + if (!path) + return -ENOMEM; key.objectid = objectid; key.offset = (u64)-1; |