mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 07:18:15 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@308623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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
Block a user