X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7578e1c04ee280dda50c4c2813e7d55f539c6501..refs/pull/1034/head:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index 08e03896..7538a49c 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -2711,6 +2711,8 @@ DIAG_ON_ASSIGN_ENUM */ dlt = new_dlt; ndo->ndo_if_printer = get_if_printer(dlt); + /* Free the old filter */ + pcap_freecode(&fcode); if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) error("%s", pcap_geterr(pd)); }