diff options
-rw-r--r-- | epan/proto.c | 5 | ||||
-rw-r--r-- | epan/tap.c | 5 | ||||
-rw-r--r-- | extcap/ciscodump.c | 5 | ||||
-rw-r--r-- | extcap/sshdump.c | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c index 6484b6bab1..2e6cea999b 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -667,7 +667,12 @@ proto_cleanup(void) #ifdef HAVE_PLUGINS if (dissector_plugins) { +#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(dissector_plugins, dissector_plugin_destroy); +#else + g_slist_foreach(dissector_plugins, (GFunc)dissector_plugin_destroy, NULL); + g_slist_free(dissector_plugins); +#endif dissector_plugins = NULL; } #endif diff --git a/epan/tap.c b/epan/tap.c index 3d61203587..77e6ffcaa7 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -772,8 +772,13 @@ void tap_cleanup(void) } #ifdef HAVE_PLUGINS +#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(tap_plugins, tap_plugin_destroy); +#else + g_slist_foreach(tap_plugins, (GFunc)tap_plugin_destroy, NULL); + g_slist_free(tap_plugins); #endif +#endif /* HAVE_PLUGINS */ } /* diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index dbd93afd98..fda78d86de 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -113,7 +113,12 @@ static char* local_interfaces_to_filter(const unsigned int remote_port) { GSList* interfaces = local_interfaces_to_list(); char* filter = interfaces_list_to_filter(interfaces, remote_port); +#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(interfaces, g_free); +#else + g_slist_foreach(interfaces, (GFunc)g_free, NULL); + g_slist_free(interfaces); +#endif return filter; } diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 74560aa4a4..efad9c16d9 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -120,7 +120,12 @@ static char* local_interfaces_to_filter(const guint16 remote_port) { GSList* interfaces = local_interfaces_to_list(); char* filter = interfaces_list_to_filter(interfaces, remote_port); +#if GLIB_CHECK_VERSION(2, 28, 0) g_slist_free_full(interfaces, g_free); +#else + g_slist_foreach(interfaces, (GFunc)g_free, NULL); + g_slist_free(interfaces); +#endif return filter; } |