Fix shutdown crash caused by modules being left open.
authorCorey Farrell <git@cfware.com>
Fri, 28 Oct 2016 02:49:43 +0000 (22:49 -0400)
committerCorey Farrell <git@cfware.com>
Fri, 28 Oct 2016 15:24:26 +0000 (10:24 -0500)
commitd6ad86789702ab2e4161c5ea086cdae64c9b614d
treeccbcc08dca493d7f0096d897a55a79c80e67bb8f
parent0ec5abe59286ed02377c2d7fe25d2e2e9babc58a
Fix shutdown crash caused by modules being left open.

It is only safe to run ast_register_cleanup callbacks when all modules
have been unloaded.  Previously these callbacks were run during graceful
shutdown, making it possible to crash during shutdown.

ASTERISK-26513 #close

Change-Id: Ibfa635bb688d1227ec54aa211d90d6bd45052e21
include/asterisk/_private.h
include/asterisk/module.h
main/asterisk.c
main/loader.c