Skip to content

Commit

Permalink
dlm: uninitialized variable on error in dlm_listen_for_all()
Browse files Browse the repository at this point in the history
commit 1f4f108 upstream.

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

Cc: stable@vger.kernel.org
Fixes: 2dc6b11 ("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>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 9, 2022
1 parent 56aa8d1 commit 03c4a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dlm/lowcomms.c
Expand Up @@ -1789,7 +1789,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: %d", result);
goto out;
return result;
}

sock_set_mark(sock->sk, dlm_config.ci_mark);
Expand Down

0 comments on commit 03c4a24

Please sign in to comment.