mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-16 17:53:15 +00:00
Release B channel allocation on error path in chan_misdn.
........ Merged revisions 370563 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370564 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -8007,6 +8007,7 @@ static struct ast_channel *misdn_request(const char *type, struct ast_format_cap
|
|||||||
/* create ast_channel and link all the objects together */
|
/* create ast_channel and link all the objects together */
|
||||||
cl = chan_list_init(ORG_AST);
|
cl = chan_list_init(ORG_AST);
|
||||||
if (!cl) {
|
if (!cl) {
|
||||||
|
misdn_lib_release(newbc);
|
||||||
ast_log(LOG_ERROR, "Could not create call record for Dial(%s)\n", dial_str);
|
ast_log(LOG_ERROR, "Could not create call record for Dial(%s)\n", dial_str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -8015,6 +8016,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 ? ast_channel_linkedid(requestor) : NULL, port, channel);
|
ast = misdn_new(cl, AST_STATE_RESERVED, args.ext, NULL, cap, requestor ? ast_channel_linkedid(requestor) : NULL, port, channel);
|
||||||
if (!ast) {
|
if (!ast) {
|
||||||
chan_list_unref(cl, "Failed to create a new channel");
|
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);
|
ast_log(LOG_ERROR, "Could not create Asterisk channel for Dial(%s)\n", dial_str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user