diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-29 19:03:01 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-29 19:03:01 +0000 |
commit | f1c96eedd1a985c804c1e7c755207a15e3afa677 (patch) | |
tree | 2abb1a5fd79f5bbd17794837a0770c1c51b4f639 /apps/app_voicemail.c | |
parent | 334aabda157a1881c10de78a12e18898ea6ffa7a (diff) |
Merged revisions 52572 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r52572 | file | 2007-01-29 13:59:41 -0500 (Mon, 29 Jan 2007) | 2 lines
Use ast_calloc instead of malloc.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@52580 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r-- | apps/app_voicemail.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index ee041a050..b521a36c0 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2539,16 +2539,14 @@ static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs) if (!vms_p) { if(option_debug > 2) ast_log (LOG_DEBUG,"Adding new vmstate for %s\n",vmu->imapuser); - vms_p = (struct vm_state *)malloc(sizeof(struct vm_state)); + if (!(vms_p = ast_calloc(1, sizeof(*vms_p)))) + return -1; ast_copy_string(vms_p->imapuser,vmu->imapuser, sizeof(vms_p->imapuser)); ast_copy_string(vms_p->username, mailboxnc, sizeof(vms_p->username)); /* save for access from interactive entry point */ vms_p->mailstream = NIL; /* save for access from interactive entry point */ if(option_debug > 2) ast_log (LOG_DEBUG,"Copied %s to %s\n",vmu->imapuser,vms_p->imapuser); - vms_p->quota_limit = 0; - vms_p->quota_usage = 0; vms_p->updated = 1; - vms_p->interactive = 0; /* set mailbox to INBOX! */ ast_copy_string(vms_p->curbox, mbox(0), sizeof(vms_p->curbox)); init_vm_state(vms_p); |