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
This commit is contained in:
Corey Farrell
2016-10-27 22:49:43 -04:00
parent e8a3af2629
commit f373de3020
4 changed files with 8 additions and 10 deletions

View File

@@ -16,6 +16,7 @@
#define _ASTERISK__PRIVATE_H
int load_modules(unsigned int); /*!< Provided by loader.c */
int modules_shutdown(void); /*!< Provided by loader.c */
int load_pbx(void); /*!< Provided by pbx.c */
int load_pbx_builtins(void); /*!< Provided by pbx_builtins.c */
int load_pbx_functions_cli(void); /*!< Provided by pbx_functions.c */