diff options
author | Günther Deschner <gd@samba.org> | 2007-03-16 14:13:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:38 -0500 |
commit | eb34ebd9e76061417200a286c2831394be04529b (patch) | |
tree | 32c1821d7df322827c4b9e748d736fc575686953 /source | |
parent | d0d16cc55ab830dcfd4f8c6c7bf64d2b9b6dd55b (diff) | |
download | samba-eb34ebd9e76061417200a286c2831394be04529b.tar.gz samba-eb34ebd9e76061417200a286c2831394be04529b.tar.xz samba-eb34ebd9e76061417200a286c2831394be04529b.zip |
r21854: Add gfree_interfaces() to gfree_all().
Guenther
Diffstat (limited to 'source')
-rw-r--r-- | source/lib/interface.c | 12 | ||||
-rw-r--r-- | source/lib/util.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source/lib/interface.c b/source/lib/interface.c index 9d0b966390f..e2c9294b281 100644 --- a/source/lib/interface.c +++ b/source/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/source/lib/util.c b/source/lib/util.c index 6789a12a1e8..45d3916ebe6 100644 --- a/source/lib/util.c +++ b/source/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(); |