summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2014-03-27 18:26:12 +0000
committerCorey Farrell <git@cfware.com>2014-03-27 18:26:12 +0000
commit44409401ec7d754a2af861f599e88e5199c2ccf0 (patch)
tree43faf909d1d58c4212c85082bb957179e5f2b35f
parenta8629e53c19774b679a102dc2ee5c11a63583315 (diff)
main/formats: Fix crash in ast_format_cmp during non-clean shutdown.
* Update asterisk.h to reflect availability of ast_register_cleanup in 11.9. * Use ast_register_cleanup for format_attr_shutdown. (closes issue ASTERISK-23103) Reported by: JoshE ........ Merged revisions 411310 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411311 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--include/asterisk.h2
-rw-r--r--main/format.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk.h b/include/asterisk.h
index 35628d231..ee1a9c337 100644
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -90,7 +90,7 @@ int ast_pbx_init(void); /*!< Provided by pbx.c */
int ast_register_atexit(void (*func)(void));
/*!
- * \since 12
+ * \since 11.9
* \brief Register a function to be executed before Asterisk gracefully exits.
*
* If Asterisk is immediately shutdown (core stop now, or sending the TERM
diff --git a/main/format.c b/main/format.c
index 579141070..9c7b5919a 100644
--- a/main/format.c
+++ b/main/format.c
@@ -1149,7 +1149,7 @@ int ast_format_attr_init(void)
}
ast_cli_register_multiple(my_clis, ARRAY_LEN(my_clis));
- ast_register_atexit(format_attr_shutdown);
+ ast_register_cleanup(format_attr_shutdown);
return 0;
}