diff --git a/CHANGELOG b/CHANGELOG index c13ce5136..eb4e3eec0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o Fixed two memory leaks in ncat_posix.c and a bug where an open file was not + being closed in libdnet-stripped/src/intf.c [Josh Marlow] + o Added a convenience top-level BSD makefile redirecting BSD make to GNU make on BSD systems. This should help prevent bogus error reports when users run "make" instead of "gmake" on BSD diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c index 7728f09f4..d3deffe32 100644 --- a/libdnet-stripped/src/intf.c +++ b/libdnet-stripped/src/intf.c @@ -677,8 +677,10 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg) intf->ifc.ifc_buf = (caddr_t)intf->ifcbuf; intf->ifc.ifc_len = sizeof(intf->ifcbuf); - if (ioctl(intf->fd, SIOCGIFCONF, &intf->ifc) < 0) + if (ioctl(intf->fd, SIOCGIFCONF, &intf->ifc) < 0) { + fclose(fp); return (-1); + } ret = 0; while (fgets(buf, sizeof(buf), fp) != NULL) {