summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/sig_pri.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 556c7db77..05d0fa4fe 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -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;