]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_motif: Correct last commit to use ao2_cleanup to free format cap
authorCorey Farrell <git@cfware.com>
Sun, 5 Oct 2014 00:12:39 +0000 (00:12 +0000)
committerCorey Farrell <git@cfware.com>
Sun, 5 Oct 2014 00:12:39 +0000 (00:12 +0000)
This fix applies to 13 and trunk.

ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424554 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_motif.c

index 0dcdf745521a0de7ac2aa0fa49def65365aeedb5..ebc77f8f421c1e7fbd25ad0bb1343d58e5d45123 100644 (file)
@@ -2759,7 +2759,7 @@ 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);
+               ao2_cleanup(jingle_tech.capabilities);
                jingle_tech.capabilities = NULL;
                return AST_MODULE_LOAD_DECLINE;
        }
@@ -2794,7 +2794,7 @@ end:
        aco_info_destroy(&cfg_info);
        ao2_global_obj_release(globals);
 
-       ast_format_cap_destroy(jingle_tech.capabilities);
+       ao2_cleanup(jingle_tech.capabilities);
        jingle_tech.capabilities = NULL;
 
        return AST_MODULE_LOAD_FAILURE;