Fix segfault regression from r370681
Due to usage of ast_hook_send_action, AMI action handling code should be able to handle a NULL mansession->session. This would cause a crash on NULL dereference if action_originate was called from ast_hook_send_action. (closes issue ASTERISK-20544) ........ Merged revisions 374792 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
9a0ff62452
commit
357b733b66
|
@ -4369,7 +4369,7 @@ static int action_originate(struct mansession *s, const struct message *m)
|
|||
|
||||
/* Allocate requested channel variables */
|
||||
vars = astman_get_variables(m);
|
||||
if (s->session->chanvars) {
|
||||
if (s->session && s->session->chanvars) {
|
||||
struct ast_variable *v, *old;
|
||||
old = vars;
|
||||
vars = NULL;
|
||||
|
|
Loading…
Reference in New Issue