diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-17 20:19:49 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-17 20:19:49 +0000 |
commit | 0e13054e811799ff3c619d4b8bcd63bdc9966149 (patch) | |
tree | 7a0ccf9b350b7d484e2e00f778eab15e39fa5a00 /main/astobj2.c | |
parent | e4c44da0a6cdf8074ee4635feff80aa58d46c419 (diff) |
Add the same fix from revision 123271 to container_destruct_debug.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123456 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/astobj2.c')
-rw-r--r-- | main/astobj2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/main/astobj2.c b/main/astobj2.c index 0bba65f17..e9e2db7e5 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -828,9 +828,18 @@ static void container_destruct(void *_c) 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); #endif |