mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Check result of ast_var_assign() calls for memory allocation failure.
We try to keep the system running even when all available memory is spent. Review: https://reviewboard.asterisk.org/r/2734/ ........ Merged revisions 396279 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 396287 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -3164,10 +3164,9 @@ static void pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if (value) { | ||||
| 	if (value && (newvariable = ast_var_assign(name, value))) { | ||||
| 		if ((option_verbose > 1) && (headp == &globals)) | ||||
| 			ast_verbose(VERBOSE_PREFIX_2 "Setting global variable '%s' to '%s'\n", name, value); | ||||
| 		newvariable = ast_var_assign(name, value); | ||||
| 		AST_LIST_INSERT_HEAD(headp, newvariable, entries); | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user