summaryrefslogtreecommitdiff
path: root/source3/lib/interface.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-03-16 14:13:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:38 -0500
commit761f60f83a81103c4c6e39b6460b9d7062a85b5f (patch)
tree9004246ca2924ee18c26a1ea04852042dcb32f63 /source3/lib/interface.c
parent3f6e08db6077a5c204bcfb35b9de634a7711f065 (diff)
downloadsamba-761f60f83a81103c4c6e39b6460b9d7062a85b5f.tar.gz
samba-761f60f83a81103c4c6e39b6460b9d7062a85b5f.tar.bz2
samba-761f60f83a81103c4c6e39b6460b9d7062a85b5f.zip
r21854: Add gfree_interfaces() to gfree_all().
Guenther (This used to be commit eb34ebd9e76061417200a286c2831394be04529b)
Diffstat (limited to 'source3/lib/interface.c')
-rw-r--r--source3/lib/interface.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index 9d0b966390..e2c9294b28 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -231,6 +231,18 @@ void load_interfaces(void)
}
+void gfree_interfaces(void)
+{
+ while (local_interfaces) {
+ struct interface *iface = local_interfaces;
+ DLIST_REMOVE(local_interfaces, local_interfaces);
+ ZERO_STRUCTPN(iface);
+ SAFE_FREE(iface);
+ }
+
+ SAFE_FREE(probed_ifaces);
+}
+
/****************************************************************************
return True if the list of probed interfaces has changed
****************************************************************************/