[Core] Fix memory leak of local_var_event in switch_ivr_originate() when caller_channel is not ready.

This commit is contained in:
Andrey Volk 2020-10-05 02:49:08 +04:00
parent dbc894d959
commit 22ae5a1ba1
1 changed files with 1 additions and 0 deletions

View File

@ -2861,6 +2861,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if (oglobals.session) {
if (!switch_channel_ready(caller_channel)) {
status = SWITCH_STATUS_FALSE;
if (local_var_event) switch_event_destroy(&local_var_event);
goto done;
}