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>
This commit is contained in:
committed by
Chris Mason
parent
f3eae7e8a5
commit
683be16eb6
@@ -1374,6 +1374,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
|
|||||||
sizeof(*range))) {
|
sizeof(*range))) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
kfree(range);
|
kfree(range);
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
/* compression requires us to start the IO */
|
/* compression requires us to start the IO */
|
||||||
if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {
|
if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) {
|
||||||
|
Reference in New Issue
Block a user