mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	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/branches/1.8@308622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -865,10 +865,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