mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Only call ast_channel_cc_params_init() if allocating a channel succeeds.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -897,7 +897,7 @@ static struct ast_channel *local_request(const char *type, format_t format, cons
|
|||||||
AST_LIST_UNLOCK(&locals);
|
AST_LIST_UNLOCK(&locals);
|
||||||
p = local_pvt_destroy(p);
|
p = local_pvt_destroy(p);
|
||||||
}
|
}
|
||||||
if (ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) {
|
if (chan && ast_channel_cc_params_init(chan, requestor ? ast_channel_get_cc_config_params((struct ast_channel *)requestor) : NULL)) {
|
||||||
chan = ast_channel_release(chan);
|
chan = ast_channel_release(chan);
|
||||||
p = local_pvt_destroy(p);
|
p = local_pvt_destroy(p);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user