You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asterisk/patches/voicemail_imap_crash_14508....

35 lines
802 B

--- apps/app_voicemail.c (revisión: 193954)
+++ apps/app_voicemail.c (revisión: 193955)
@@ -7441,6 +7441,10 @@
/* If ADSI is supported, setup login screen */
adsi_begin(chan, &useadsi);
+ if (!valid) {
+ goto out;
+ }
+
#ifdef IMAP_STORAGE
pthread_once(&ts_vmstate.once, ts_vmstate.key_init);
pthread_setspecific(ts_vmstate.key, &vms);
@@ -7452,9 +7456,6 @@
vmstate_insert(&vms);
init_vm_state(&vms);
#endif
- if (!valid)
- goto out;
-
if (!(vms.deleted = ast_calloc(vmu->maxmsg, sizeof(int)))) {
/* TODO: Handle memory allocation failure */
}
@@ -7869,7 +7870,9 @@
}
/* before we delete the state, we should copy pertinent info
* back to the persistent model */
- vmstate_delete(&vms);
+ if (vmu) {
+ vmstate_delete(&vms);
+ }
#endif
if (vmu)
free_user(vmu);