[svn-commits] mmichelson: trunk r123456 - /trunk/main/astobj2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jun 17 15:19:49 CDT 2008


Author: mmichelson
Date: Tue Jun 17 15:19:49 2008
New Revision: 123456

URL: http://svn.digium.com/view/asterisk?view=rev&rev=123456
Log:
Add the same fix from revision 123271 to container_destruct_debug.


Modified:
    trunk/main/astobj2.c

Modified: trunk/main/astobj2.c
URL: http://svn.digium.com/view/asterisk/trunk/main/astobj2.c?view=diff&rev=123456&r1=123455&r2=123456
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Tue Jun 17 15:19:49 2008
@@ -828,8 +828,17 @@
 static void container_destruct_debug(void *_c)
 {
 	struct ao2_container *c = _c;
+	int i;
 
 	_ao2_callback_debug(c, OBJ_UNLINK, cd_cb_debug, NULL, "container_destruct_debug called", __FILE__, __LINE__, __PRETTY_FUNCTION__);
+
+	for (i = 0; i < c->n_buckets; i++) {
+		struct bucket_list *cur;
+
+		while ((cur = AST_LIST_REMOVE_HEAD(&c->buckets[i], entry))) {
+			ast_free(cur);
+		}
+	}
 
 #ifdef AO2_DEBUG
 	ast_atomic_fetchadd_int(&ao2.total_containers, -1);




More information about the svn-commits mailing list