Hi,
Similar to the others. malloc & memset replacement with calloc, this time in
sbin/nfsd/nfsd.c
Index: nfsd.c
===================================================================
RCS file: /cvs/src/sbin/nfsd/nfsd.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 nfsd.c
--- nfsd.c 11 Mar 2013 17:40:10 -0000 1.32
+++ nfsd.c 24 Apr 2014 01:32:04 -0000
@@ -277,13 +277,12 @@ main(int argc, char *argv[])
* Allocate space for the fd_set pointers and fill in sockbits
*/
fd_size = howmany(maxsock + 1, NFDBITS) * sizeof(fd_mask);
- sockbits = malloc(fd_size);
+ sockbits = calloc(1, fd_size);
ready = malloc(fd_size);
if (sockbits == NULL || ready == NULL) {
syslog(LOG_ERR, "cannot allocate memory");
return (1);
}
- memset(sockbits, 0, fd_size);
if (tcpflag)
FD_SET(tcpsock, sockbits);
--
Peter Malone <[email protected]>