From: Andrey Volk Date: Thu, 18 Feb 2021 16:02:03 +0000 (+0300) Subject: [Core] Fix leaking codec, timer and abuf in switch_ivr_play_file() in the case of... X-Git-Tag: v1.10.6^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ca0d02531f91f66cc2f34b909eb14221dc04f54;p=thirdparty%2Ffreeswitch.git [Core] Fix leaking codec, timer and abuf in switch_ivr_play_file() in the case of failing switch_ivr_phrase_macro() or switch_ivr_speak_text() --- diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index e217950958..a8cb5fd4a1 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1309,8 +1309,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess *arg++ = '\0'; } if ((status = switch_ivr_phrase_macro(session, dup, arg, lang, args)) != SWITCH_STATUS_SUCCESS) { - arg_recursion_check_stop(args); - return status; + break; } continue; } else { @@ -1327,8 +1326,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess if (engine && text) { if ((status = switch_ivr_speak_text(session, engine, voice, (char *)text, args)) != SWITCH_STATUS_SUCCESS) { - arg_recursion_check_stop(args); - return status; + break; } } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid Args\n");