summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/volumes.c b/volumes.c
index 2d07e66a..e022c16e 100644
--- a/volumes.c
+++ b/volumes.c
@@ -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;