mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
smb/server: fix refcount leak in smb2_open()
When ksmbd_vfs_getattr() fails, the reference count of ksmbd_file must be released. Suggested-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
committed by
Steve French
parent
3296c3012a
commit
f416c55699
@@ -3010,10 +3010,10 @@ int smb2_open(struct ksmbd_work *work)
|
||||
file_info = FILE_OPENED;
|
||||
|
||||
rc = ksmbd_vfs_getattr(&fp->filp->f_path, &stat);
|
||||
ksmbd_put_durable_fd(fp);
|
||||
if (rc)
|
||||
goto err_out2;
|
||||
|
||||
ksmbd_put_durable_fd(fp);
|
||||
goto reconnected_fp;
|
||||
}
|
||||
} else if (req_op_level == SMB2_OPLOCK_LEVEL_LEASE)
|
||||
|
||||
Reference in New Issue
Block a user