Merge branch 'jk/rebase-am-fork-point'
[gitweb.git] / compat / mingw.c
index c19e3d954bc58b61028873b2e75b0604201531e5..9d435e2cf4487de66f97c8a829975584bee52c9d 100644 (file)
@@ -1316,8 +1316,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