[asterisk-commits] russell: trunk r47232 - /trunk/utils/check_expr.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 6 11:05:12 MST 2006


Author: russell
Date: Mon Nov  6 12:05:11 2006
New Revision: 47232

URL: http://svn.digium.com/view/asterisk?rev=47232&view=rev
Log:
check for failure after call to calloc() (issue #8295)

Modified:
    trunk/utils/check_expr.c

Modified: trunk/utils/check_expr.c
URL: http://svn.digium.com/view/asterisk/trunk/utils/check_expr.c?rev=47232&r1=47231&r2=47232&view=diff
==============================================================================
--- trunk/utils/check_expr.c (original)
+++ trunk/utils/check_expr.c Mon Nov  6 12:05:11 2006
@@ -69,6 +69,8 @@
 void set_var(const char *varname, const char *varval)
 {
 	struct varz *t = calloc(1,sizeof(struct varz));
+	if (!t)
+		return;
 	strcpy(t->varname, varname);
 	strcpy(t->varval, varval);
 	t->next = global_varlist;



More information about the asterisk-commits mailing list