]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_loopback] Fix new_session leak in the case of a hangup_cause.
authorAndrey Volk <andywolk@gmail.com>
Mon, 14 Dec 2020 20:46:08 +0000 (00:46 +0400)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Mar 2021 15:34:21 +0000 (18:34 +0300)
src/mod/endpoints/mod_loopback/mod_loopback.c

index 88400fcaf6abd94e3049d2e6092450feb916b835..6fa0d4fbd48593c3c178ecf2a05230adad9a084d 100644 (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);
                }