From ece6e7c1a4c2305ece68264810765d4e54ff9f49 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Sun, 12 Feb 2017 22:59:32 +0100 Subject: Fix compilation without plugins. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit proto.c:667:6: error: ‘dissector_plugins’ undeclared (first use in this function) tap.c:773:20: error: ‘tap_plugins’ undeclared (first use in this function) Change-Id: I8feaec4219dc97202bdb79d72399c5fd1d383e27 Reviewed-on: https://code.wireshark.org/review/20081 Petri-Dish: Jakub Zawadzki Reviewed-by: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki --- epan/tap.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'epan/tap.c') diff --git a/epan/tap.c b/epan/tap.c index c10dff4f0d..3d61203587 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -177,6 +177,13 @@ register_all_plugin_tap_listeners(void) { g_slist_foreach(tap_plugins, register_tap_plugin_listener, NULL); } + +static void +tap_plugin_destroy(gpointer p) +{ + g_free(p); +} + #endif /* HAVE_PLUGINS */ /* ********************************************************************** @@ -744,12 +751,6 @@ union_of_tap_listener_flags(void) return flags; } -static void -tap_plugin_destroy(gpointer p) -{ - g_free(p); -} - void tap_cleanup(void) { volatile tap_listener_t *elem_lq; @@ -770,7 +771,9 @@ void tap_cleanup(void) g_free((gpointer)elem_dl); } +#ifdef HAVE_PLUGINS g_slist_free_full(tap_plugins, tap_plugin_destroy); +#endif } /* -- cgit v1.2.3