aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 12363ac5d..d0717651e 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3872,13 +3872,13 @@ out:
}
if (vmu)
close_mailbox(&vms, vmu);
- if (vmu)
- free_user(vmu);
if (valid) {
snprintf(ext_context, sizeof(ext_context), "%s@%s", vms.username, vmu->context);
manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s\r\nWaiting: %d\r\n", ext_context, ast_app_has_voicemail(ext_context));
run_externnotify(chan->context, ext_context);
}
+ if (vmu)
+ free_user(vmu);
LOCAL_USER_REMOVE(u);
return res;