[Core] Fix leaking stream in switch_channel_expand_variables_check()

This commit is contained in:
Andrey Volk 2021-01-28 03:13:13 +03:00
parent 3134c9aa57
commit e6e227d1f4
1 changed files with 1 additions and 0 deletions

View File

@ -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))) {
func_val = NULL;
sub_val = "<API Execute Permission Denied>";
free(stream.data);
} else {
if (switch_api_execute(vname, vval, channel->session, &stream) == SWITCH_STATUS_SUCCESS) {
func_val = stream.data;