summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-20 11:24:48 +0000
committerChris Mason <chris.mason@oracle.com>2010-03-30 21:19:09 -0400
commit683be16eb6e19a35aca2473668652259ed074094 (patch)
treee6ed753b392a576999140ab9758db9c58dc60926 /fs/btrfs
parentf3eae7e8a5ed124bbc781e18ea10c21856017322 (diff)
downloadlinux-683be16eb6e19a35aca2473668652259ed074094.tar.bz2
Btrfs: dereferencing freed memory
The original code dereferenced range on the next line. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 5c9f8b30608c..874d36e5f167 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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)) {