diff options
author | Matt Jordan <mjordan@digium.com> | 2015-04-20 06:29:56 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-04-20 06:29:56 -0500 |
commit | 27a122af666e6d3f122d874a75f852cdd4f33903 (patch) | |
tree | 819b3180f300179d1721935eb1839f9737f39327 | |
parent | 9581a0ebf3cd8035193167e5c07b627e050f78d2 (diff) | |
parent | f0c82a173a4dfc78b0f5ebc484a8b905877c95fc (diff) |
Merge "main/pbx: Don't attempt to destroy a previously destroyed exten/priority tuple" into 13
-rw-r--r-- | main/pbx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c index 0f01152a9..e2ee12636 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -10734,6 +10734,16 @@ void __ast_context_destroy(struct ast_context *list, struct ast_hashtab *context exten_iter = ast_hashtab_start_traversal(tmp->root_table); while ((exten_item=ast_hashtab_next(exten_iter))) { int end_traversal = 1; + + /* + * If the extension could not be removed from the root_table due to + * a loaded PBX app, it can exist here but have its peer_table be + * destroyed due to a previous pass through this function. + */ + if (!exten_item->peer_table) { + continue; + } + prio_iter = ast_hashtab_start_traversal(exten_item->peer_table); while ((prio_item=ast_hashtab_next(prio_iter))) { char extension[AST_MAX_EXTENSION]; |