]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Only call ast_channel_cc_params_init() if allocating a channel succeeds.
authorRussell Bryant <russell@russellbryant.com>
Tue, 20 Jul 2010 17:22:36 +0000 (17:22 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 20 Jul 2010 17:22:36 +0000 (17:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278051 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_local.c

index 36dcc94c9f74d150e77889fac61d93c5a1154c7a..20db5d04aef93774fd3304f1728f160c4e195dac 100644 (file)
@@ -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);
                }