diff --git a/tshark.c b/tshark.c index fac5b0bb55..84c8d5f929 100644 --- a/tshark.c +++ b/tshark.c @@ -2189,7 +2189,9 @@ main(int argc, char *argv[]) output_fields = NULL; clean_exit: +#ifdef HAVE_LIBPCAP capture_opts_cleanup(&global_capture_opts); +#endif return exit_status; } diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 6f52e4bccc..827171a309 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -943,7 +943,9 @@ int main(int argc, char *qt_argv[]) #endif /* _WIN32 */ clean_exit: +#ifdef HAVE_LIBPCAP capture_opts_cleanup(&global_capture_opts); +#endif return ret_val; }