From: Andrey Volk Date: Sun, 4 Oct 2020 22:49:08 +0000 (+0400) Subject: [Core] Fix memory leak of local_var_event in switch_ivr_originate() when caller_chann... X-Git-Tag: v1.10.6^2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22ae5a1ba124632c17159edfe0cc51deff76e859;p=thirdparty%2Ffreeswitch.git [Core] Fix memory leak of local_var_event in switch_ivr_originate() when caller_channel is not ready. --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 99370d7e79..d2baeb2741 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -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; }