From f6e076507e6645745b733e0c91305bba7a832473 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Tue, 15 Dec 2020 00:46:08 +0400 Subject: [PATCH] [mod_loopback] Fix new_session leak in the case of a hangup_cause. --- src/mod/endpoints/mod_loopback/mod_loopback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/endpoints/mod_loopback/mod_loopback.c b/src/mod/endpoints/mod_loopback/mod_loopback.c index 88400fcaf6..6fa0d4fbd4 100644 --- a/src/mod/endpoints/mod_loopback/mod_loopback.c +++ b/src/mod/endpoints/mod_loopback/mod_loopback.c @@ -1700,6 +1700,7 @@ static switch_call_cause_t null_channel_outgoing_channel(switch_core_session_t * if (hangup_cause || !strncmp(caller_profile->destination_number, "cause-", 6)) { if (!hangup_cause) hangup_cause = caller_profile->destination_number + 6; + switch_core_session_destroy(new_session); return switch_channel_str2cause(hangup_cause); }