1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-08 22:46:34 +00:00

Fixed two memory leaks and a case where an open file may not be closed.

This commit is contained in:
josh
2009-07-02 03:36:43 +00:00
parent fa404e03c9
commit 294b15ce81
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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) {