From: Kirsty Tyerman Date: Tue, 26 Jun 2018 03:08:07 +0000 (+1000) Subject: pbx_dundi: reordered unloading of module pbx_dundi X-Git-Tag: 16.0.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b9bf4f5e09a6e739bbd7ebe8c7b000d3aa722dc;p=thirdparty%2Fasterisk.git pbx_dundi: reordered unloading of module pbx_dundi Destroy scheduler after peers are pruned to stop dundi crashing when unloading module. ASTERISK-26987 Reported-by: Kirsty Tyerman Change-Id: Ic12e562cd90d8d813a9e97f302045091f59e3c05 --- diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index e356d6fdef..a94d71cc42 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -4982,13 +4982,14 @@ static int unload_module(void) close(netsocket); io_context_destroy(io); - ast_sched_context_destroy(sched); mark_mappings(); prune_mappings(); mark_peers(); prune_peers(); + ast_sched_context_destroy(sched); + return 0; }