Don't free until after externnotify (bug #1993)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-08 16:24:16 +00:00
parent 568ba9c398
commit 68dd66c46d

View File

@@ -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;