1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +00:00

Call arp_close() on arp handle in setTargetNextHopMAC() in tcpip.cc. This functions frees it and closes it's descriptor. Found with Coverity, CID 16

This commit is contained in:
kris
2007-11-16 01:50:51 +00:00
parent 6ce9d03d8a
commit b452a38426

View File

@@ -2452,8 +2452,10 @@ bool setTargetNextHopMAC(Target *target) {
if (arp_get(a, &ae) == 0) {
NmapArpCache(ARPCACHE_SET, &targetss, ae.arp_ha.addr_eth.data);
target->setNextHopMACAddress(ae.arp_ha.addr_eth.data);
arp_close(a);
return true;
}
arp_close(a);
/* OK, the last choice is to send our own damn ARP request (and
retransmissions if necessary) to determine the MAC */