diff options
| -rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 5d91776e12a2..d38981567e4e 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -3090,7 +3090,7 @@ out_unlock: | |||
| 3090 | static long btrfs_ioctl_file_extent_same(struct file *file, | 3090 | static long btrfs_ioctl_file_extent_same(struct file *file, |
| 3091 | struct btrfs_ioctl_same_args __user *argp) | 3091 | struct btrfs_ioctl_same_args __user *argp) |
| 3092 | { | 3092 | { |
| 3093 | struct btrfs_ioctl_same_args *same; | 3093 | struct btrfs_ioctl_same_args *same = NULL; |
| 3094 | struct btrfs_ioctl_same_extent_info *info; | 3094 | struct btrfs_ioctl_same_extent_info *info; |
| 3095 | struct inode *src = file_inode(file); | 3095 | struct inode *src = file_inode(file); |
| 3096 | u64 off; | 3096 | u64 off; |
| @@ -3120,6 +3120,7 @@ static long btrfs_ioctl_file_extent_same(struct file *file, | |||
| 3120 | 3120 | ||
| 3121 | if (IS_ERR(same)) { | 3121 | if (IS_ERR(same)) { |
| 3122 | ret = PTR_ERR(same); | 3122 | ret = PTR_ERR(same); |
| 3123 | same = NULL; | ||
| 3123 | goto out; | 3124 | goto out; |
| 3124 | } | 3125 | } |
| 3125 | 3126 | ||
| @@ -3190,6 +3191,7 @@ static long btrfs_ioctl_file_extent_same(struct file *file, | |||
| 3190 | 3191 | ||
| 3191 | out: | 3192 | out: |
| 3192 | mnt_drop_write_file(file); | 3193 | mnt_drop_write_file(file); |
| 3194 | kfree(same); | ||
| 3193 | return ret; | 3195 | return ret; |
| 3194 | } | 3196 | } |
| 3195 | 3197 | ||
