diff options
Diffstat (limited to 'tfshark.c')
-rw-r--r-- | tfshark.c | 20 |
1 files changed, 5 insertions, 15 deletions
@@ -866,10 +866,8 @@ main(int argc, char *argv[]) * cruft getting in the way. Makes the results of running * $ ./tools/valgrind-wireshark -n * much more useful. */ -#ifdef HAVE_EXTCAP - extcap_cleanup(); -#endif epan_cleanup(); + extcap_cleanup(); return 0; case 'O': /* Only output these protocols */ /* already processed; just ignore it now */ @@ -996,10 +994,8 @@ main(int argc, char *argv[]) if (!dfilter_compile(rfilter, &rfcode, &err_msg)) { cmdarg_err("%s", err_msg); g_free(err_msg); -#ifdef HAVE_EXTCAP - extcap_cleanup(); -#endif epan_cleanup(); + extcap_cleanup(); return 2; } } @@ -1009,10 +1005,8 @@ main(int argc, char *argv[]) if (!dfilter_compile(dfilter, &dfcode, &err_msg)) { cmdarg_err("%s", err_msg); g_free(err_msg); -#ifdef HAVE_EXTCAP - extcap_cleanup(); -#endif epan_cleanup(); + extcap_cleanup(); return 2; } } @@ -1057,10 +1051,8 @@ main(int argc, char *argv[]) /* TODO: if tfshark is ever changed to give the user a choice of which open_routine reader to use, then the following needs to change. */ if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK) { -#ifdef HAVE_EXTCAP - extcap_cleanup(); -#endif epan_cleanup(); + extcap_cleanup(); return 2; } @@ -1098,10 +1090,8 @@ main(int argc, char *argv[]) draw_tap_listeners(TRUE); funnel_dump_all_text_windows(); epan_free(cfile.epan); -#ifdef HAVE_EXTCAP - extcap_cleanup(); -#endif epan_cleanup(); + extcap_cleanup(); output_fields_free(output_fields); output_fields = NULL; |