summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-10-01 18:58:13 +0200
committerChris Mason <chris.mason@oracle.com>2009-10-01 18:58:13 +0200
commit25472b880c69c0daa485c4f80a6550437ed1149f (patch)
treed12bc091e8991513db0d2891111ba773eb5c52e2 /fs/btrfs/volumes.c
parentLinux 2.6.32-rc1 (diff)
parentBtrfs: take i_mutex before generic_write_checks (diff)
downloadlinux-25472b880c69c0daa485c4f80a6550437ed1149f.tar.xz
linux-25472b880c69c0daa485c4f80a6550437ed1149f.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable into for-linus
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 23e7d36ff325..7eda483d7b5a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -446,8 +446,10 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig)
goto error;
device->name = kstrdup(orig_dev->name, GFP_NOFS);
- if (!device->name)
+ if (!device->name) {
+ kfree(device);
goto error;
+ }
device->devid = orig_dev->devid;
device->work.func = pending_bios_fn;