diff mbox

Btrfs: fix various things with the listing ioctl

Message ID 4B26F909.2040101@jp.fujitsu.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

TARUISI Hiroaki Dec. 15, 2009, 2:48 a.m. UTC
None
diff mbox

Patch

Index: b/fs/btrfs/ioctl.c
===================================================================
--- a/fs/btrfs/ioctl.c	2009-12-15 11:31:18.000000000 +0900
+++ b/fs/btrfs/ioctl.c	2009-12-15 11:33:28.000000000 +0900
@@ -989,6 +989,7 @@  static noinline int btrfs_ioctl_snap_lis
 		if (rest < sizeof(struct btrfs_ioctl_subvol_items) +
 			name_len + strlen(work_path) + 1) {
 			svol->next_len = name_len + strlen(work_path);
+			kfree(name);
 			if (copy_to_user(arg, svol, sizeof(*svol))) {
 				ret = -EFAULT;
 				goto out;