mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-27 16:07:15 -07:00
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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user