From 97dfe638b405d48c6ccdd43610755d3dfa99b22b Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Nov 2019 08:16:14 +0100 Subject: [PATCH] Fix uninitialized variable, found by Coverity Scan Signed-off-by: Joachim Nilsson --- src/syslogd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/syslogd.c b/src/syslogd.c index e6d7506..f24a206 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -528,6 +528,7 @@ static void create_unix_socket(struct peer *pe) struct addrinfo ai; int sd = -1; + memset(&ai, 0, sizeof(ai)); ai.ai_addr = (struct sockaddr *)&sun; ai.ai_addrlen = sizeof(sun); ai.ai_family = sun.sun_family = AF_UNIX;