aboutsummaryrefslogtreecommitdiffstats
path: root/extcap/sshdump.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/sshdump.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/sshdump.c')
-rw-r--r--extcap/sshdump.c5
1 files changed, 5 insertions, 0 deletions
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;
}