mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01: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:
parent
3296c3012a
commit
f416c55699
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue