Avoid crashing FS after delivering a VM

When vm-storage-dir was set to an absolute path, FS would abort after
delivering a VM because we were trying to free(3) memory sitting in
the middle of a memory pool.

FS-5329
This commit is contained in:
Travis Cross 2013-06-03 08:56:38 +00:00
parent 9ae26ff50d
commit 505815c902
1 changed files with 1 additions and 1 deletions

View File

@ -2752,7 +2752,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
if (!zstr(vm_storage_dir)) {
/* check for absolute or relative path */
if (switch_is_file_path(vm_storage_dir)) {
dir_path = switch_core_strdup(pool, vm_storage_dir);
dir_path = strdup(vm_storage_dir);
} else {
dir_path = switch_mprintf("%s%svoicemail%s%s", SWITCH_GLOBAL_dirs.storage_dir,
SWITCH_PATH_SEPARATOR, SWITCH_PATH_SEPARATOR, vm_storage_dir);