mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 10:08:08 +00:00
[Core] Fix leaking stream in switch_channel_expand_variables_check()
This commit is contained in:
parent
3134c9aa57
commit
e6e227d1f4
@ -4175,6 +4175,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables_check(switch_channel_t *c
|
|||||||
if (!switch_core_test_flag(SCF_API_EXPANSION) || (api_list && !switch_event_check_permission_list(api_list, vname))) {
|
if (!switch_core_test_flag(SCF_API_EXPANSION) || (api_list && !switch_event_check_permission_list(api_list, vname))) {
|
||||||
func_val = NULL;
|
func_val = NULL;
|
||||||
sub_val = "<API Execute Permission Denied>";
|
sub_val = "<API Execute Permission Denied>";
|
||||||
|
free(stream.data);
|
||||||
} else {
|
} else {
|
||||||
if (switch_api_execute(vname, vval, channel->session, &stream) == SWITCH_STATUS_SUCCESS) {
|
if (switch_api_execute(vname, vval, channel->session, &stream) == SWITCH_STATUS_SUCCESS) {
|
||||||
func_val = stream.data;
|
func_val = stream.data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user