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:
2
tcpip.cc
2
tcpip.cc
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user