mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-12 01:20:14 +00:00
smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe()
When ksmbd_iov_pin_rsp() fails, we should call ksmbd_session_rpc_close(). 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
0c56693b06
commit
7c28f8eef5
@ -2281,7 +2281,7 @@ static noinline int create_smb2_pipe(struct ksmbd_work *work)
|
||||
{
|
||||
struct smb2_create_rsp *rsp;
|
||||
struct smb2_create_req *req;
|
||||
int id;
|
||||
int id = -1;
|
||||
int err;
|
||||
char *name;
|
||||
|
||||
@ -2338,6 +2338,9 @@ out:
|
||||
break;
|
||||
}
|
||||
|
||||
if (id >= 0)
|
||||
ksmbd_session_rpc_close(work->sess, id);
|
||||
|
||||
if (!IS_ERR(name))
|
||||
kfree(name);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user