1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-29 09:39:03 +00:00

Avoid double-free due to calling pcap_close when IOD is deleted

This commit is contained in:
dmiller
2019-03-19 15:51:43 +00:00
parent 4fb51d6a3e
commit fe9a1db4dd

View File

@@ -299,6 +299,7 @@ int nsock_pcap_open(nsock_pool nsp, nsock_iod nsiod, const char *pcap_device,
// PCAP error
nsock_log_error("pcap_activate(%s) FAILED: %s.", pcap_device, pcap_geterr(mp->pt));
pcap_close(mp->pt);
mp->pt = NULL;
return -1;
}
else if (failed > 0) {