mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Fix a crash on reload by using calloc() instead of malloc() to ensure that
data is properly initialized. (issue #9765, reported by MatsK, patch from eliel) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2301,7 +2301,7 @@ static int timezone_add(char *zonename, char *config)
|
||||
struct minivm_zone *newzone;
|
||||
char *msg_format, *timezone;
|
||||
|
||||
newzone = malloc(sizeof(struct minivm_zone));
|
||||
newzone = ast_calloc(1, sizeof(struct minivm_zone));
|
||||
if (newzone == NULL)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user