From: Travis Cross Date: Mon, 3 Jun 2013 08:56:38 +0000 (+0000) Subject: Avoid crashing FS after delivering a VM X-Git-Tag: v1.2.13~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=499f7096c4de4c21deceecce257aa5699b0e369b;p=thirdparty%2Ffreeswitch.git 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 --- diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 26841a0972..0ecbe9994f 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -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);