]> 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>
Fri, 29 Jun 2018 04:01:25 +0000 (22:01 -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 03017d2baef63625ec9022d050571c59d9892f15..c8ddffb6c969183752ad9618c8ae68a3a3ea60f4 100644 (file)
@@ -4984,13 +4984,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;
 }