diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-03-23 01:25:01 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-03-23 01:25:01 +0000 |
commit | afae35390515c2555f1199d10a2fd103e8c7441b (patch) | |
tree | f219510fe2e4d6014ba976062506b55f857f3bcb /tethereal.c | |
parent | ad3cd277de12e117a7a17bd4817fb93aa8dfd972 (diff) |
If we have "pcap_freecode()", use it to free the instructions for a BPF
filter after installing the filter.
Set HAVE_PCAP_LIB_VERSION if we're building with WinPcap 3.1; it's not
present in earlier versions, but is present in current 3.1 betas.
Check HAVE_PCAP_LIB_VERSION when building capture-wpcap.c.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13872 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tethereal.c b/tethereal.c index ef6e5cd2af..1bdf2e48e3 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1651,8 +1651,14 @@ capture(char *save_file, int out_file_type) if (pcap_setfilter(ld.pch, &fcode) < 0) { snprintf(errmsg, sizeof errmsg, "Can't install filter (%s).", pcap_geterr(ld.pch)); +#ifdef HAVE_PCAP_FREECODE + pcap_freecode(&fcode); +#endif goto error; } +#ifdef HAVE_PCAP_FREECODE + pcap_freecode(&fcode); +#endif } /* Set up to write to the capture file. */ |