aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-20 07:24:48 -0400
committerChris Mason <chris.mason@oracle.com>2010-03-30 21:19:09 -0400
commit683be16eb6e19a35aca2473668652259ed074094 (patch)
treee6ed753b392a576999140ab9758db9c58dc60926 /fs/btrfs
parentf3eae7e8a5ed124bbc781e18ea10c21856017322 (diff)
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)
1374 sizeof(*range))) { 1374 sizeof(*range))) {
1375 ret = -EFAULT; 1375 ret = -EFAULT;
1376 kfree(range); 1376 kfree(range);
1377 goto out;
1377 } 1378 }
1378 /* compression requires us to start the IO */ 1379 /* compression requires us to start the IO */
1379 if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) { 1380 if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {