From e0e9552985b1f90af253fa100f7b0bb5ac00d438 Mon Sep 17 00:00:00 2001 From: Kirsty Tyerman Date: Tue, 26 Jun 2018 13:08:07 +1000 Subject: [PATCH] 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 --- pbx/pbx_dundi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }