diff options
author | Corey Farrell <git@cfware.com> | 2014-10-05 00:01:53 +0000 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2014-10-05 00:01:53 +0000 |
commit | 3987b978d6f103329e17f2c4b23c3d7588a15f4d (patch) | |
tree | 63de075c0aa5e909a1541b0d0e0487db45ac1437 /channels | |
parent | 30e6eed19d09bf98915c4807444a279789f4bf4c (diff) |
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
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_motif.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_motif.c b/channels/chan_motif.c index 2582a0eeb..0dcdf7455 100644 --- a/channels/chan_motif.c +++ b/channels/chan_motif.c @@ -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; } |