aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/ciscodump.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2017-02-16 16:13:41 +0100
committerAnders Broman <a.broman58@gmail.com>2017-02-16 21:03:44 +0000
commit16c3ecbd4c903815f4797f4f69daff98e9cb8807 (patch)
treebbe1541da5bf02d948674bdfe8f375fa8b9fa52d /extcap/ciscodump.c
parent14e19128dca1b318896ab7768d4527723dbefd17 (diff)
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>
Diffstat (limited to 'extcap/ciscodump.c')
-rw-r--r--extcap/ciscodump.c5
1 files changed, 5 insertions, 0 deletions
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;
}