]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Fix some leaks found by Valgrind/Memcheck
[tcpdump] / tcpdump.c
index de8f63307d65c640e4ff88fe21d090624ace9f93..02a6aa517e20427031455f36356dcbe772921b1a 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1486,6 +1486,7 @@ main(int argc, char **argv)
                bpf_dump(&fcode, dflag);
                pcap_close(pd);
                free(cmdbuf);
+               pcap_freecode(&fcode);
                exit(0);
        }
        init_print(ndo, localnet, netmask, timezone_offset);
@@ -1782,6 +1783,7 @@ main(int argc, char **argv)
        while (ret != NULL);
 
        free(cmdbuf);
+       pcap_freecode(&fcode);
        exit(status == -1 ? 1 : 0);
 }