From 940f7b4acd26e7fc96336006858b32965f6fe503 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 18 Nov 2009 15:19:09 +0100 Subject: [PATCH] s3:load_interfaces(): use function gfree_interfaces() that we have. To reduce code duplication. Michael (cherry picked from commit aea3a8f50131744f8393d0179cd04a1b97982028) (cherry picked from commit 5caad323a212a3f046adb7e5a7d86edc819a2d3a) --- source3/lib/interface.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 4a8a154edbc..79c62a7ae71 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -496,15 +496,7 @@ void load_interfaces(void) const char **ptr = lp_interfaces(); int i; - SAFE_FREE(probed_ifaces); - - /* dump the current interfaces if any */ - while (local_interfaces) { - struct interface *iface = local_interfaces; - DLIST_REMOVE(local_interfaces, local_interfaces); - SAFE_FREE(iface->name); - SAFE_FREE(iface); - } + gfree_interfaces(); /* Probe the kernel for interfaces */ total_probed = get_interfaces(talloc_tos(), &ifaces); -- 2.11.4.GIT