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/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@424550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/61/61/1
Corey Farrell 11 years ago
parent 2e62e7b1ef
commit 4d1c38ef37

@ -2564,6 +2564,8 @@ static int load_module(void)
if (aco_process_config(&cfg_info, 0)) { if (aco_process_config(&cfg_info, 0)) {
ast_log(LOG_ERROR, "Unable to read config file motif.conf. Not loading module.\n"); ast_log(LOG_ERROR, "Unable to read config file motif.conf. Not loading module.\n");
aco_info_destroy(&cfg_info); aco_info_destroy(&cfg_info);
ast_format_cap_destroy(jingle_tech.capabilities);
jingle_tech.capabilities = NULL;
return AST_MODULE_LOAD_DECLINE; return AST_MODULE_LOAD_DECLINE;
} }
@ -2594,6 +2596,10 @@ end:
} }
aco_info_destroy(&cfg_info); 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; return AST_MODULE_LOAD_FAILURE;
} }

Loading…
Cancel
Save