Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: check return value of alloc_extent_map() Btrfs - Fix memory leak in btrfs_init_new_device() btrfs: prevent heap corruption in btrfs_ioctl_space_info() Btrfs: Fix balance panic Btrfs: don't release pages when we can't clear the uptodate bits Btrfs: fix page->private races
This commit is contained in:
@@ -1605,12 +1605,14 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
|
||||
|
||||
ret = find_next_devid(root, &device->devid);
|
||||
if (ret) {
|
||||
kfree(device->name);
|
||||
kfree(device);
|
||||
goto error;
|
||||
}
|
||||
|
||||
trans = btrfs_start_transaction(root, 0);
|
||||
if (IS_ERR(trans)) {
|
||||
kfree(device->name);
|
||||
kfree(device);
|
||||
ret = PTR_ERR(trans);
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user