mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 00:04:47 +08:00
ksmbd: uninitialized variable in create_socket()
commitb207602fb0
upstream. The "ksmbd_socket" variable is not initialized on this error path. Cc: stable@vger.kernel.org Fixes:0626e6641f
("cifsd: add server handler for central processing and tranport layers") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
893dfb14ca
commit
bbba4a0b8e
@ -404,7 +404,7 @@ static int create_socket(struct interface *iface)
|
||||
&ksmbd_socket);
|
||||
if (ret) {
|
||||
pr_err("Can't create socket for ipv4: %d\n", ret);
|
||||
goto out_error;
|
||||
goto out_clear;
|
||||
}
|
||||
|
||||
sin.sin_family = PF_INET;
|
||||
@ -462,6 +462,7 @@ static int create_socket(struct interface *iface)
|
||||
|
||||
out_error:
|
||||
tcp_destroy_socket(ksmbd_socket);
|
||||
out_clear:
|
||||
iface->ksmbd_socket = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user