You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Btrfs: fix error handling in btrfs_ioctl_send()
fget() returns NULL if error. So, we should check NULL or not. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
committed by
Josef Bacik
parent
ba1eeaac99
commit
ecc7ada77b
+2
-2
@@ -4612,8 +4612,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
|
||||
sctx->flags = arg->flags;
|
||||
|
||||
sctx->send_filp = fget(arg->send_fd);
|
||||
if (IS_ERR(sctx->send_filp)) {
|
||||
ret = PTR_ERR(sctx->send_filp);
|
||||
if (!sctx->send_filp) {
|
||||
ret = -EBADF;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user