From: deraadt Date: Sat, 4 May 1996 12:57:29 +0000 (+0000) Subject: clear xports after allocating it; netbsd pr#2194; from ragge@my28.sm.luth.se X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4aa3277ab70d3b29bd713aae9b55217ea4b8c48d;p=openbsd clear xports after allocating it; netbsd pr#2194; from ragge@my28.sm.luth.se --- diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c index ea911b37b4f..12c42b2ca49 100644 --- a/lib/libc/rpc/svc.c +++ b/lib/libc/rpc/svc.c @@ -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;