[asterisk-commits] rmudgett: branch 1.8 r308622 - /branches/1.8/channels/sig_pri.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 23 17:38:09 CST 2011
Author: rmudgett
Date: Wed Feb 23 17:38:04 2011
New Revision: 308622
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=308622
Log:
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
Modified:
branches/1.8/channels/sig_pri.c
Modified: branches/1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_pri.c?view=diff&rev=308622&r1=308621&r2=308622
==============================================================================
--- branches/1.8/channels/sig_pri.c (original)
+++ branches/1.8/channels/sig_pri.c Wed Feb 23 17:38:04 2011
@@ -865,10 +865,14 @@
{
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;
More information about the asterisk-commits
mailing list