aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-04 23:03:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-04 23:03:56 +0000
commitcb9e56de536093d2cda39e4d5241d452570aaea1 (patch)
tree0115f89ab2f60ed2b21427d163a84ed7bf00e562 /apps
parente2f45f8d327eccfb5eca3a42b30012e8730ccb70 (diff)
fix potential crash in close_mailbox (bug #4800)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6284 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_voicemail.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 6fc5deefa..baf0ecbc1 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2655,9 +2655,11 @@ static void close_mailbox(struct vm_state *vms, struct ast_vm_user *vmu)
vm_delete(vms->fn);
}
ast_unlock_path(vms->curdir);
- }
- memset(vms->deleted, 0, sizeof(vms->deleted));
- memset(vms->heard, 0, sizeof(vms->heard));
+ }
+ if (vms->deleted)
+ memset(vms->deleted, 0, sizeof(vms->deleted));
+ if (vms->heard)
+ memset(vms->heard, 0, sizeof(vms->heard));
}
static int vm_play_folder_name(struct ast_channel *chan, char *mbox)