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: 15.5.0-rc1~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0e9552985b1f90af253fa100f7b0bb5ac00d438;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 d80f660299..b6f7a1ad09 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -4981,13 +4981,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; }