mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-28 10:13:43 +00:00
Fix a variety of ref counting issues
This patch resolves a number of ref leaks that occur primarily on Asterisk shutdown. It adds a variety of shutdown routines to core portions of Asterisk such that they can reclaim resources allocate duringd initialization. Review: https://reviewboard.asterisk.org/r/2137 ........ Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2590,12 +2590,15 @@ static int load_module(void)
|
||||
ast_format_cap_add_all(agent_tech.capabilities);
|
||||
/* Make sure we can register our agent channel type */
|
||||
if (ast_channel_register(&agent_tech)) {
|
||||
agent_tech.capabilities = ast_format_cap_destroy(agent_tech.capabilities);
|
||||
ast_log(LOG_ERROR, "Unable to register channel class 'Agent'\n");
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
/* Read in the config */
|
||||
if (!read_agent_config(0))
|
||||
if (!read_agent_config(0)) {
|
||||
agent_tech.capabilities = ast_format_cap_destroy(agent_tech.capabilities);
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
/* Dialplan applications */
|
||||
ast_register_application_xml(app, login_exec);
|
||||
ast_register_application_xml(app3, agentmonitoroutgoing_exec);
|
||||
|
Reference in New Issue
Block a user