aboutsummaryrefslogtreecommitdiffstats
path: root/capchild/capture_ifinfo.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-26 17:14:52 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-27 02:04:00 +0000
commitcdb7a7a25dfc87a1b12c43d134cab43a612427cb (patch)
treedf327c638aa31c6dc431a4d902776c6b14d48c8f /capchild/capture_ifinfo.c
parent842a9b510074c896e54735e2e3a575ea802f23ea (diff)
Fix appending the list of remote interfaces.
Don't assume if_list is non-null when append_remote_list() is called; it won't be, if we didn't find any local interfaces. Have append_remote_list() return the final if_list value, and assign it to if_list. Change-Id: I05586d5b034f3d61aa38a20f6c6d2c69117b367e Reviewed-on: https://code.wireshark.org/review/14191 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capchild/capture_ifinfo.c')
-rw-r--r--capchild/capture_ifinfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/capchild/capture_ifinfo.c b/capchild/capture_ifinfo.c
index 3d848814d9..8e4c59fa4e 100644
--- a/capchild/capture_ifinfo.c
+++ b/capchild/capture_ifinfo.c
@@ -45,7 +45,7 @@
#ifdef HAVE_PCAP_REMOTE
static GList *remote_interface_list = NULL;
-static void append_remote_list(GList *iflist)
+static GList * append_remote_list(GList *iflist)
{
GSList *list;
GList *rlist;
@@ -79,6 +79,7 @@ static void append_remote_list(GList *iflist)
temp->loopback = if_info->loopback;
iflist = g_list_append(iflist, temp);
}
+ return iflist;
}
#endif
@@ -193,7 +194,7 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void))
#ifdef HAVE_PCAP_REMOTE
if (remote_interface_list && g_list_length(remote_interface_list) > 0) {
- append_remote_list(if_list);
+ if_list = append_remote_list(if_list);
}
#endif