From: Mark Michelson Date: Tue, 18 Nov 2008 23:59:02 +0000 (+0000) Subject: This change prevents a crash from occurring if res_musiconhold.so X-Git-Tag: 1.6.2.0-beta1~838 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a361f7897a5d2a0038f3da9e8403b825d5c9f644;p=thirdparty%2Fasterisk.git This change prevents a crash from occurring if res_musiconhold.so is unloaded and then Asterisk is stopped. The problem was that we are not unregistering the ast_moh_destroy function at exit. (closes issue #13761) Reported by: eliel Patches: res_musiconhold.c.patch uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157592 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index c90c6fd117..4507411ee9 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -1672,6 +1672,7 @@ static int unload_module(void) res |= ast_unregister_application(start_moh); res |= ast_unregister_application(stop_moh); ast_cli_unregister_multiple(cli_moh, sizeof(cli_moh) / sizeof(struct ast_cli_entry)); + ast_unregister_atexit(ast_moh_destroy); return res; }