]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix memory leak of local_var_event in switch_ivr_originate() when caller_chann...
authorAndrey Volk <andywolk@gmail.com>
Sun, 4 Oct 2020 22:49:08 +0000 (02:49 +0400)
committerAndrey Volk <andywolk@gmail.com>
Tue, 16 Mar 2021 21:53:55 +0000 (00:53 +0300)
src/switch_ivr_originate.c

index 99370d7e7949c01f8d3dddab001d64b53d61cddc..d2baeb27411ca3a00210e1e91ea2a2a09d99d1b0 100644 (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;
                                        }