Dan Carpenter d815b3f2f2 btrfs: fix error pointer dereference in btrfs_ioctl_rm_dev_v2()
If memdup_user() fails the error handing will crash when it tries
to kfree() an error pointer.  Just return directly because there is
no cleanup required.

Fixes: 1a15eb724aae ("btrfs: use btrfs_get_dev_args_from_path in dev removal ioctls")
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-12-08 15:40:19 +01:00
..
2021-09-02 09:21:27 -07:00
2021-06-22 14:11:57 +02:00
2021-06-22 14:11:57 +02:00
2019-11-18 23:43:44 +01:00
2021-06-22 14:11:57 +02:00
2021-08-23 13:19:09 +02:00
2021-10-29 12:38:43 +02:00
2021-10-29 12:38:43 +02:00
2021-10-26 19:08:05 +02:00