mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
clear out memory allocated by LOCAL_USER_ADD/LOCAL_USER_ACF_ADD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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 ""; \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user