clear xports after allocating it; netbsd pr#2194; from ragge@my28.sm.luth.se
authorderaadt <deraadt@openbsd.org>
Sat, 4 May 1996 12:57:29 +0000 (12:57 +0000)
committerderaadt <deraadt@openbsd.org>
Sat, 4 May 1996 12:57:29 +0000 (12:57 +0000)
lib/libc/rpc/svc.c

index ea911b3..12c42b2 100644 (file)
@@ -87,6 +87,7 @@ xprt_register(xprt)
        if (xports == NULL) {
                xports = (SVCXPRT **)
                        mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *));
+               memset(xports, 0, FD_SETSIZE * sizeof(SVCXPRT *));
        }
        if (sock < FD_SETSIZE) {
                xports[sock] = xprt;