mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Fix leaking compiled pcap filter. Fixes #2609
This commit is contained in:
@@ -117,11 +117,10 @@ static int nsock_pcap_set_filter(struct npool *nsp, pcap_t *pt, const char *devi
|
||||
rc = pcap_setfilter(pt, &fcode);
|
||||
if (rc) {
|
||||
nsock_log_error("Failed to set the pcap filter: %s", pcap_geterr(pt));
|
||||
return rc;
|
||||
}
|
||||
|
||||
pcap_freecode(&fcode);
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int nsock_pcap_get_l3_offset(pcap_t *pt, int *dl) {
|
||||
|
||||
Reference in New Issue
Block a user