diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-20 17:22:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-20 17:22:36 +0000 |
commit | fd7e8d53f761df942ad32fc4361cf190b8c2544c (patch) | |
tree | e92fb0915852bc693f2ee44f7f1caa9acd9d1713 /channels/chan_local.c | |
parent | 8ec6e3276f681296693510b9d428bf1006d487af (diff) |
Only call ast_channel_cc_params_init() if allocating a channel succeeds.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278051 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r-- | channels/chan_local.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 36dcc94c9..20db5d04a 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -897,7 +897,7 @@ static struct ast_channel *local_request(const char *type, format_t format, cons AST_LIST_UNLOCK(&locals); 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); p = local_pvt_destroy(p); } |