Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 683be16e authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Mason
Browse files

Btrfs: dereferencing freed memory



The original code dereferenced range on the next line.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent f3eae7e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1374,6 +1374,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
					   sizeof(*range))) {
				ret = -EFAULT;
				kfree(range);
				goto out;
			}
			/* compression requires us to start the IO */
			if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {