From b452a3842638fae2a524406ea760aac5c7108e25 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 16 Nov 2007 01:50:51 +0000 Subject: [PATCH] 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 --- tcpip.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcpip.cc b/tcpip.cc index 2182883c4..c3e13bcb1 100644 --- a/tcpip.cc +++ b/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 */