diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-31 14:52:30 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-31 14:52:30 +0000 |
commit | e66dd5eb50c597ea3692d318c3c252541ba31052 (patch) | |
tree | 560d10e0ce2389ff0977819f5b6bef6fd453e3a8 /apps | |
parent | 34f471d4c476172cb65c26ffdb2cbcb91e1b2de6 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@66724 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_minivm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 8dc8d6a5f..7af82d767 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -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; |