btrfs-progs: check: fix missing newlines
[platform/upstream/btrfs-progs.git] / volumes.c
index 70d8940..e39f21e 100644 (file)
--- a/volumes.c
+++ b/volumes.c
@@ -1080,9 +1080,12 @@ int btrfs_alloc_data_chunk(struct btrfs_trans_handle *trans,
                key.offset = *start;
                dev_offset = *start;
        } else {
+               u64 tmp;
+
                ret = find_next_chunk(chunk_root,
                                      BTRFS_FIRST_CHUNK_TREE_OBJECTID,
-                                     &key.offset);
+                                     &tmp);
+               key.offset = tmp;
                if (ret)
                        return ret;
        }
@@ -2140,8 +2143,11 @@ int write_raid56_with_parity(struct btrfs_fs_info *info,
 
        ebs = malloc(sizeof(*ebs) * multi->num_stripes);
        pointers = malloc(sizeof(*pointers) * multi->num_stripes);
-       if (!ebs || !pointers)
+       if (!ebs || !pointers) {
+               free(ebs);
+               free(pointers);
                return -ENOMEM;
+       }
 
        if (stripe_len > alloc_size)
                alloc_size = stripe_len;