diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-20 12:24:48 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-31 03:19:09 +0200 |
commit | 683be16eb6e19a35aca2473668652259ed074094 (patch) | |
tree | e6ed753b392a576999140ab9758db9c58dc60926 /fs/btrfs | |
parent | Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() (diff) | |
download | linux-683be16eb6e19a35aca2473668652259ed074094.tar.xz linux-683be16eb6e19a35aca2473668652259ed074094.zip |
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.c | 1 |
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)) { |