From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Mon, 4 Apr 2022 16:06:28 -0400 Subject: [Cluster-devel] [PATCH RESEND v5.18-rc1 01/19] fs: dlm: uninitialized variable on error in dlm_listen_for_all() In-Reply-To: <20220404200646.3170301-1-aahringo@redhat.com> References: <20220404200646.3170301-1-aahringo@redhat.com> Message-ID: <20220404200646.3170301-2-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Dan Carpenter The "sock" variable is not initialized on this error path. Cc: stable at vger.kernel.org Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen") Signed-off-by: Dan Carpenter Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index e284d696c1fd..6ed935ad8247 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -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); -- 2.31.1