]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
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>
Tue, 26 Jun 2018 03:08:07 +0000 (13:08 +1000)
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 d80f66029923e1e7497144e943225524c94a1a6d..b6f7a1ad0969a510034568af4d750d6e129787df 100644 (file)
@@ -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;
 }