pbx_dundi: reordered unloading of module pbx_dundi
authorKirsty Tyerman <kirsty.tyerman@boeing.com>
Tue, 26 Jun 2018 03:08:07 +0000 (13:08 +1000)
committerKirsty Tyerman <kirsty.tyerman@boeing.com>
Fri, 29 Jun 2018 03:59:56 +0000 (21:59 -0600)
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

index e356d6f..a94d71c 100644 (file)
@@ -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;
 }