svn commit: samba r21854 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_25/source/lib

gd at samba.org gd at samba.org
Fri Mar 16 14:13:46 GMT 2007


Author: gd
Date: 2007-03-16 14:13:46 +0000 (Fri, 16 Mar 2007)
New Revision: 21854

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21854

Log:
Add gfree_interfaces() to gfree_all().

Guenther

Modified:
   branches/SAMBA_3_0/source/lib/interface.c
   branches/SAMBA_3_0/source/lib/util.c
   branches/SAMBA_3_0_25/source/lib/interface.c
   branches/SAMBA_3_0_25/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/interface.c
===================================================================
--- branches/SAMBA_3_0/source/lib/interface.c	2007-03-16 13:09:09 UTC (rev 21853)
+++ branches/SAMBA_3_0/source/lib/interface.c	2007-03-16 14:13:46 UTC (rev 21854)
@@ -231,6 +231,18 @@
 }
 
 
+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
 ****************************************************************************/

Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c	2007-03-16 13:09:09 UTC (rev 21853)
+++ branches/SAMBA_3_0/source/lib/util.c	2007-03-16 14:13:46 UTC (rev 21854)
@@ -200,6 +200,7 @@
 	gfree_debugsyms();
 	gfree_charcnv();
 	gfree_messages();
+	gfree_interfaces();
 
 	/* release the talloc null_context memory last */
 	talloc_disable_null_tracking();

Modified: branches/SAMBA_3_0_25/source/lib/interface.c
===================================================================
--- branches/SAMBA_3_0_25/source/lib/interface.c	2007-03-16 13:09:09 UTC (rev 21853)
+++ branches/SAMBA_3_0_25/source/lib/interface.c	2007-03-16 14:13:46 UTC (rev 21854)
@@ -231,6 +231,18 @@
 }
 
 
+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
 ****************************************************************************/

Modified: branches/SAMBA_3_0_25/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0_25/source/lib/util.c	2007-03-16 13:09:09 UTC (rev 21853)
+++ branches/SAMBA_3_0_25/source/lib/util.c	2007-03-16 14:13:46 UTC (rev 21854)
@@ -200,6 +200,7 @@
 	gfree_debugsyms();
 	gfree_charcnv();
 	gfree_messages();
+	gfree_interfaces();
 
 	/* release the talloc null_context memory last */
 	talloc_disable_null_tracking();



More information about the samba-cvs mailing list