ksmbd: Fix potential memory leak in tcp_destroy_socket()
ksmbd_socket must be freed even if kernel_sock_shutdown() somehow fails. Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
378087cd17
commit
654c8876f9
|
@ -381,7 +381,6 @@ static void tcp_destroy_socket(struct socket *ksmbd_socket)
|
|||
ret = kernel_sock_shutdown(ksmbd_socket, SHUT_RDWR);
|
||||
if (ret)
|
||||
pr_err("Failed to shutdown socket: %d\n", ret);
|
||||
else
|
||||
sock_release(ksmbd_socket);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue