From 761f60f83a81103c4c6e39b6460b9d7062a85b5f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 16 Mar 2007 14:13:46 +0000 Subject: r21854: Add gfree_interfaces() to gfree_all(). Guenther (This used to be commit eb34ebd9e76061417200a286c2831394be04529b) --- source3/lib/interface.c | 12 ++++++++++++ source3/lib/util.c | 1 + 2 files changed, 13 insertions(+) (limited to 'source3') 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 ****************************************************************************/ diff --git a/source3/lib/util.c b/source3/lib/util.c index 6789a12a1e..45d3916ebe 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -200,6 +200,7 @@ void gfree_all( void ) gfree_debugsyms(); gfree_charcnv(); gfree_messages(); + gfree_interfaces(); /* release the talloc null_context memory last */ talloc_disable_null_tracking(); -- cgit