[NeoStats-Devel] [Commits] r2785 - in trunk: . modules/extauth

[email protected] Wed, 31 Aug 2005 23:27:01 +1000
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Fish
Date: Wed Aug 31 21:26:52 2005
New Revision: 2785

Modified:
   trunk/ChangeLog
   trunk/modules/extauth/extauth.c
Log:
Fix a memleak in ExtAuth (BTW, SVN/Mail is down for outside access atm)

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Wed Aug 31 21:26:52 2005
@@ -4,6 +4,7 @@
 Fish (F), Mark (M), DeadNotBuried (D)
 ===============================================================================
 * NeoStats * Version 3.0.a3-dev
+ - Fix a memleak in ExtAuth (F)
  - Netinfo on Ultimate3 is like Globops, not a burst function (F)
  - Create core support for map generation accessible to all modules via a 
    callback handler and tidy up StatServ map code to take advantage of 

Modified: trunk/modules/extauth/extauth.c
==============================================================================
--- trunk/modules/extauth/extauth.c	(original)
+++ trunk/modules/extauth/extauth.c	Wed Aug 31 21:26:52 2005
@@ -307,7 +307,22 @@
 
 int ModFini( void )
 {
+	hscan_t accessscan;
+	hnode_t *node;
+	AccessEntry *access;
+
 	del_services_cmd_list( extauth_commands );
+
+
+	hash_scan_begin( &accessscan, accesshash );
+	while( ( node = hash_scan_next( &accessscan ) )!= NULL) 
+	{
+		access = hnode_get( node );
+		ns_free (access);
+		hash_scan_delete_destroy_node(accesshash, node);
+	}
+	hash_destroy(accesshash);
+
 	return NS_SUCCESS;
 }