[mod_loopback] Fix new_session leak in the case of a hangup_cause.

This commit is contained in:
Andrey Volk 2020-12-15 00:46:08 +04:00
parent e3e0c7c259
commit f6e076507e

View File

@ -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);
}