Index: devices.c =================================================================== RCS file: /home/ncvs/src/release/sysinstall/Attic/devices.c,v retrieving revision 1.117.2.13 diff -u -r1.117.2.13 devices.c --- devices.c 2001/07/30 17:31:42 1.117.2.13 +++ devices.c 2001/09/29 22:34:08 @@ -266,6 +266,7 @@ ifc.ifc_len = sizeof(buffer); ifc.ifc_buf = buffer; + /* This is never closed! */ s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) goto skipif; /* Jump over network iface probing */ @@ -273,6 +274,7 @@ if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) goto skipif; /* Jump over network iface probing */ + close(s); ifflags = ifc.ifc_req->ifr_flags; end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len); for (ifptr = ifc.ifc_req; ifptr < end; ifptr++) { @@ -319,6 +321,7 @@ loopend: if (ifptr->ifr_addr.sa_len) /* I'm not sure why this is here - it's inherited */ ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr)); + close(s); /* Don't leak file descriptors! */ } skipif: