Merge branch 'zk/log-graph-showsig' into maint
[gitweb.git] / compat / mingw.c
index e9892f8ee48db4739321d37726cff63dec8c0f13..363a957a1d406d222c1099ec01d0aea6fae43add 100644 (file)
@@ -1226,8 +1226,7 @@ static int WSAAPI getaddrinfo_stub(const char *node, const char *service,
        else
                ai->ai_canonname = NULL;
 
-       sin = xmalloc(ai->ai_addrlen);
-       memset(sin, 0, ai->ai_addrlen);
+       sin = xcalloc(1, ai->ai_addrlen);
        sin->sin_family = AF_INET;
        /* Note: getaddrinfo is supposed to allow service to be a string,
         * which should be looked up using getservbyname. This is