aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/module.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-24 23:10:24 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-24 23:10:24 +0000
commit5200cc1f4840e4d29720dfe473bad01ae430ec9e (patch)
tree952a3a107b158bdc5f4fef710d315c287b27b378 /include/asterisk/module.h
parentdaedd05a267f8afd1b8ca03e337bb2c7c1e9fa91 (diff)
clear out memory allocated by LOCAL_USER_ADD/LOCAL_USER_ACF_ADD
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6395 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/module.h')
-rwxr-xr-xinclude/asterisk/module.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index ce5888d25..82445a403 100755
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -297,7 +297,7 @@ void ast_unregister_atexit(void (*func)(void));
*/
#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 @@ void ast_unregister_atexit(void (*func)(void));
#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 ""; \
} \