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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user