aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rawshark.c9
-rw-r--r--tfshark.c10
-rw-r--r--tshark.c10
-rw-r--r--ui/gtk/main.c2
-rw-r--r--wireshark-qt.cpp2
5 files changed, 32 insertions, 1 deletions
diff --git a/rawshark.c b/rawshark.c
index 510ed80bcf..d4acc8af94 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -803,7 +803,9 @@ main(int argc, char *argv[])
g_free(err_msg);
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
exit(2);
}
n_rfcodes++;
@@ -825,7 +827,9 @@ main(int argc, char *argv[])
if (raw_cf_open(&cfile, pipe_name) != CF_OK) {
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
exit(2);
}
@@ -847,7 +851,9 @@ main(int argc, char *argv[])
if (!load_cap_file(&cfile)) {
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
exit(2);
}
} else {
@@ -858,8 +864,9 @@ main(int argc, char *argv[])
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
-
+#endif
return 0;
}
diff --git a/tfshark.c b/tfshark.c
index d2d7db5621..5b2fdaa338 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -867,7 +867,9 @@ main(int argc, char *argv[])
* $ ./tools/valgrind-wireshark -n
* much more useful. */
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 0;
case 'O': /* Only output these protocols */
/* already processed; just ignore it now */
@@ -995,7 +997,9 @@ main(int argc, char *argv[])
cmdarg_err("%s", err_msg);
g_free(err_msg);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 2;
}
}
@@ -1006,7 +1010,9 @@ main(int argc, char *argv[])
cmdarg_err("%s", err_msg);
g_free(err_msg);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 2;
}
}
@@ -1052,7 +1058,9 @@ main(int argc, char *argv[])
open_routine reader to use, then the following needs to change. */
if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK) {
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 2;
}
@@ -1091,7 +1099,9 @@ main(int argc, char *argv[])
funnel_dump_all_text_windows();
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
output_fields_free(output_fields);
output_fields = NULL;
diff --git a/tshark.c b/tshark.c
index 2e2ec5c76c..a009907357 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1311,7 +1311,9 @@ main(int argc, char *argv[])
* $ ./tools/valgrind-wireshark -n
* much more useful. */
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 0;
case 'O': /* Only output these protocols */
/* already processed; just ignore it now */
@@ -1731,7 +1733,9 @@ main(int argc, char *argv[])
cmdarg_err("%s", err_msg);
g_free(err_msg);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
#ifdef HAVE_PCAP_OPEN_DEAD
{
pcap_t *pc;
@@ -1758,7 +1762,9 @@ main(int argc, char *argv[])
cmdarg_err("%s", err_msg);
g_free(err_msg);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
#ifdef HAVE_PCAP_OPEN_DEAD
{
pcap_t *pc;
@@ -1870,7 +1876,9 @@ main(int argc, char *argv[])
*/
if (cf_open(&cfile, cf_name, in_file_type, FALSE, &err) != CF_OK) {
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
return 2;
}
@@ -2032,7 +2040,9 @@ main(int argc, char *argv[])
funnel_dump_all_text_windows();
epan_free(cfile.epan);
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
output_fields_free(output_fields);
output_fields = NULL;
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 860e824fe2..09ae47147a 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2756,7 +2756,9 @@ main(int argc, char *argv[])
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
AirPDcapDestroyContext(&airpdcap_ctx);
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index 69f03d7f7f..950950774d 100644
--- a/wireshark-qt.cpp
+++ b/wireshark-qt.cpp
@@ -857,7 +857,9 @@ int main(int argc, char *argv[])
epan_cleanup();
+#ifdef HAVE_EXTCAP
extcap_cleanup();
+#endif
AirPDcapDestroyContext(&airpdcap_ctx);