[asterisk-commits] oej: trunk r242043 - /trunk/main/acl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 21 15:05:59 CST 2010


Author: oej
Date: Thu Jan 21 15:05:56 2010
New Revision: 242043

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242043
Log:
Make sure we initialize the ast_ha structure with ast_calloc

Modified:
    trunk/main/acl.c

Modified: trunk/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/acl.c?view=diff&rev=242043&r1=242042&r2=242043
==============================================================================
--- trunk/main/acl.c (original)
+++ trunk/main/acl.c Thu Jan 21 15:05:56 2010
@@ -237,7 +237,7 @@
 {
 	struct ast_ha *new_ha;
 
-	if ((new_ha = ast_malloc(sizeof(*new_ha)))) {
+	if ((new_ha = ast_calloc(sizeof(*new_ha)))) {
 		/* Copy from original to new object */
 		ast_copy_ha(original, new_ha);
 	}
@@ -284,7 +284,7 @@
 		path = path->next;
 	}
 
-	if (!(ha = ast_malloc(sizeof(*ha)))) {
+	if (!(ha = ast_calloc(sizeof(*ha)))) {
 		return ret;
 	}
 




More information about the asterisk-commits mailing list