Merged revisions 308622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r308622 | rmudgett | 2011-02-23 17:38:04 -0600 (Wed, 23 Feb 2011) | 9 lines sig_pri_new_ast_channel() should return NULL when new_ast_channel() fails. (closes issue #18874) Reported by: cmaj Patches: patch-sig_pri-crash-possible-null-channel-pointer.diff.txt uploaded by cmaj (license 830) JIRA SWP-3172 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@308623 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
f27e928f05
commit
9524cbe470
|
@ -884,10 +884,14 @@ static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int s
|
|||
{
|
||||
struct ast_channel *c;
|
||||
|
||||
if (p->calls->new_ast_channel)
|
||||
if (p->calls->new_ast_channel) {
|
||||
c = p->calls->new_ast_channel(p->chan_pvt, state, ulaw, exten, requestor);
|
||||
else
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
if (!c) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!p->owner)
|
||||
p->owner = c;
|
||||
|
|
Reference in New Issue