From 044afa7d59fbc3d2d22143298962d9060b912c67 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 18 Apr 2009 14:34:47 -0700 Subject: [PATCH] From Robert Edmonds: free the string that contains the filter as soon as we're done with it. --- CREDITS | 1 + tcpdump.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CREDITS b/CREDITS index fa62fe3e..fb9065e3 100644 --- a/CREDITS +++ b/CREDITS @@ -144,6 +144,7 @@ Additional people who have contributed patches: Rick Jones Rick Watson Rob Braun + Robert Edmonds Roderick Schertler Sagun Shakya Sami Farin diff --git a/tcpdump.c b/tcpdump.c index 18914d4b..9c418f38 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -1082,6 +1082,7 @@ main(int argc, char **argv) if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0) error("%s", pcap_geterr(pd)); + free(cmdbuf); if (dflag) { bpf_dump(&fcode, dflag); pcap_close(pd); -- 2.39.5