Fix uninitialized variable, found by Coverity Scan

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-13 08:16:14 +01:00
parent 0555e0989f
commit 97dfe638b4

View File

@ -528,6 +528,7 @@ static void create_unix_socket(struct peer *pe)
struct addrinfo ai; struct addrinfo ai;
int sd = -1; int sd = -1;
memset(&ai, 0, sizeof(ai));
ai.ai_addr = (struct sockaddr *)&sun; ai.ai_addr = (struct sockaddr *)&sun;
ai.ai_addrlen = sizeof(sun); ai.ai_addrlen = sizeof(sun);
ai.ai_family = sun.sun_family = AF_UNIX; ai.ai_family = sun.sun_family = AF_UNIX;