1
0
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:
dmiller
2023-08-23 15:07:56 +00:00
parent 3be01efb1c
commit 0876310c2a

View File

@@ -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) {