dlm: uninitialized variable on error in dlm_listen_for_all()

commit 1f4f10845e upstream.

The "sock" variable is not initialized on this error path.

Cc: stable@vger.kernel.org
Fixes: 2dc6b1158c ("fs: dlm: introduce generic listen")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dan Carpenter 2022-04-04 16:06:28 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель acdad5bc98
Коммит 697b45d5f0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1776,7 +1776,7 @@ static int dlm_listen_for_all(void)
SOCK_STREAM, dlm_proto_ops->proto, &sock);
if (result < 0) {
log_print("Can't create comms socket, check SCTP is loaded");
goto out;
return result;
}
sock_set_mark(sock->sk, dlm_config.ci_mark);