g_slist_free_full requires glib 2.28
Change-Id: I4f9ce7f65da0349b962f6be317635c5acb2daf73 Reviewed-on: https://code.wireshark.org/review/20148 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
14e19128dc
commit
16c3ecbd4c
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue