summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-05-13 19:29:56 +0000
committerJonathan Rose <jrose@digium.com>2013-05-13 19:29:56 +0000
commit6a257dd5346ba939af6afc5b908e4708a0425dde (patch)
tree8a75fc7da202cfe4a7cb596fc9273aa0034e110a /main/pbx.c
parent3de63e9de9e5f314e7ab26fd9b35ca66308aa29d (diff)
pbx: Fix lack of cleanup on macrolock and context_table
(closes issue ASTERISK-21723) Reported by: Corey Farrell Patches: core-pbx-cleanup.patch uploaded by Correy Farrell (license 5909) ........ Merged revisions 388532 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 388578 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 43805ce7c..74aeee928 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -10435,6 +10435,7 @@ static void __ast_internal_context_destroy( struct ast_context *con)
}
tmp->root = NULL;
ast_rwlock_destroy(&tmp->lock);
+ ast_mutex_destroy(&tmp->macrolock);
ast_free(tmp);
}
@@ -12142,6 +12143,10 @@ static void pbx_shutdown(void)
ao2_ref(statecbs, -1);
statecbs = NULL;
}
+ if (contexts_table) {
+ ast_hashtab_destroy(contexts_table, NULL);
+ }
+ pbx_builtin_clear_globals();
}
int ast_pbx_init(void)