[Asterisk-cvs] asterisk/include/asterisk module.h,1.21,1.22

kpfleming kpfleming
Wed Aug 24 19:08:33 CDT 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv26387/include/asterisk

Modified Files:
	module.h 
Log Message:
clear out memory allocated by LOCAL_USER_ADD/LOCAL_USER_ACF_ADD


Index: module.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/module.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- module.h	25 Jul 2005 22:52:25 -0000	1.21
+++ module.h	24 Aug 2005 23:10:24 -0000	1.22
@@ -297,7 +297,7 @@
  */
 #define LOCAL_USER_ADD(u) { \
  \
-	if (!(u=(struct localuser *)malloc(sizeof(struct localuser)))) { \
+	if (!(u=calloc(1,sizeof(*u)))) { \
 		ast_log(LOG_WARNING, "Out of memory\n"); \
 		return -1; \
 	} \
@@ -312,7 +312,7 @@
 
 #define LOCAL_USER_ACF_ADD(u) { \
  \
-	if (!(u=(struct localuser *)malloc(sizeof(struct localuser)))) { \
+	if (!(u=calloc(1,sizeof(*u)))) { \
 		ast_log(LOG_WARNING, "Out of memory\n"); \
 		return ""; \
 	} \




More information about the svn-commits mailing list