aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 7cad59353b09..dadaaa8005c8 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1603,12 +1603,14 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
1603 1603
1604 ret = find_next_devid(root, &device->devid); 1604 ret = find_next_devid(root, &device->devid);
1605 if (ret) { 1605 if (ret) {
1606 kfree(device->name);
1606 kfree(device); 1607 kfree(device);
1607 goto error; 1608 goto error;
1608 } 1609 }
1609 1610
1610 trans = btrfs_start_transaction(root, 0); 1611 trans = btrfs_start_transaction(root, 0);
1611 if (IS_ERR(trans)) { 1612 if (IS_ERR(trans)) {
1613 kfree(device->name);
1612 kfree(device); 1614 kfree(device);
1613 ret = PTR_ERR(trans); 1615 ret = PTR_ERR(trans);
1614 goto error; 1616 goto error;