diff options
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 6e2a0ab96..725d25758 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -11400,6 +11400,7 @@ static struct ast_cli_entry cli_iax2[] = { static int __unload_module(void) { struct iax2_thread *thread = NULL; + struct ast_context *con; int x; /* Make sure threads do not hold shared resources when they are canceled */ @@ -11465,7 +11466,11 @@ static int __unload_module(void) ao2_ref(peers, -1); ao2_ref(users, -1); - + + con = ast_context_find(regcontext); + if (con) + ast_context_destroy(con, "IAX2"); + return 0; } |