]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Release B channel allocation on error path in chan_misdn.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 30 Jul 2012 16:49:12 +0000 (16:49 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 30 Jul 2012 16:49:12 +0000 (16:49 +0000)
........

Merged revisions 370563 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

channels/chan_misdn.c

index a985164824e4b7c945cecc11cf12a4e2bd4ada64..f7eec9ccfe304de73fc1f8328f45cf34b27b12fb 100644 (file)
@@ -8000,6 +8000,7 @@ static struct ast_channel *misdn_request(const char *type, struct ast_format_cap
        /* create ast_channel and link all the objects together */
        cl = chan_list_init(ORG_AST);
        if (!cl) {
+               misdn_lib_release(newbc);
                ast_log(LOG_ERROR, "Could not create call record for Dial(%s)\n", dial_str);
                return NULL;
        }
@@ -8008,6 +8009,7 @@ static struct ast_channel *misdn_request(const char *type, struct ast_format_cap
        ast = misdn_new(cl, AST_STATE_RESERVED, args.ext, NULL, cap, requestor ? requestor->linkedid : NULL, port, channel);
        if (!ast) {
                chan_list_unref(cl, "Failed to create a new channel");
+               misdn_lib_release(newbc);
                ast_log(LOG_ERROR, "Could not create Asterisk channel for Dial(%s)\n", dial_str);
                return NULL;
        }