mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
6ce9d03d8a
commit
b452a38426
1 changed files with 2 additions and 0 deletions
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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue