To reduce code duplication.
Michael
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);