Btrfs: introduce missing kfree
[deliverable/linux.git] / fs / btrfs / volumes.c
index be953afe804cd0dda01578ced4d962faf6c23b7e..20cbd2eebd9731718956720c02c18958569234c3 100644 (file)
@@ -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;
This page took 0.037236 seconds and 5 git commands to generate.