[02/10] btrfs: fix memleak in btrfs_init_new_device
diff mbox

Message ID 20091104190432.526063543@suse.com
State Deferred
Headers show

Commit Message

Jeff Mahoney Nov. 4, 2009, 7:03 p.m. UTC
None

Patch
diff mbox

--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1474,6 +1474,7 @@  int btrfs_init_new_device(struct btrfs_r
 
 	ret = find_next_devid(root, &device->devid);
 	if (ret) {
+		kfree(device->name);
 		kfree(device);
 		goto error;
 	}