mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
chan_motif: Release format capabilities and config on module load error
ASTERISK-24384 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4043/ ........ Merged revisions 424550 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424551 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424552 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2759,6 +2759,8 @@ static int load_module(void)
|
||||
ao2_ref(jingle_tech.capabilities, -1);
|
||||
ast_log(LOG_ERROR, "Unable to read config file motif.conf. Module loaded but not running.\n");
|
||||
aco_info_destroy(&cfg_info);
|
||||
ast_format_cap_destroy(jingle_tech.capabilities);
|
||||
jingle_tech.capabilities = NULL;
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
||||
@@ -2790,6 +2792,10 @@ end:
|
||||
}
|
||||
|
||||
aco_info_destroy(&cfg_info);
|
||||
ao2_global_obj_release(globals);
|
||||
|
||||
ast_format_cap_destroy(jingle_tech.capabilities);
|
||||
jingle_tech.capabilities = NULL;
|
||||
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user