diff options
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index b0c426fe1..dbc1bb05c 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -14692,7 +14692,6 @@ static int __unload_module(void) ao2_ref(users, -1); ao2_ref(iax_peercallno_pvts, -1); ao2_ref(iax_transfercallno_pvts, -1); - ao2_ref(peercnts, -1); ao2_ref(callno_limits, -1); ao2_ref(calltoken_ignores, -1); if (timer) { @@ -14700,8 +14699,11 @@ static int __unload_module(void) timer = NULL; } transmit_processor = ast_taskprocessor_unreference(transmit_processor); + + ast_sched_clean_by_callback(sched, peercnt_remove_cb, peercnt_remove_cb); ast_sched_context_destroy(sched); sched = NULL; + ao2_ref(peercnts, -1); con = ast_context_find(regcontext); if (con) |