提交 e5fb456f authored 作者: Anthony Minessale's avatar Anthony Minessale

doh regression

上级 74a0cfd1
...@@ -1561,6 +1561,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const ...@@ -1561,6 +1561,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
char *cloned_sub_val = NULL; char *cloned_sub_val = NULL;
char *func_val = NULL; char *func_val = NULL;
int nv = 0; int nv = 0;
char *gvar = NULL;
nv = switch_string_var_check_const(in) || switch_string_has_escaped_data(in); nv = switch_string_var_check_const(in) || switch_string_has_escaped_data(in);
...@@ -1673,7 +1674,6 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const ...@@ -1673,7 +1674,6 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
int offset = 0; int offset = 0;
int ooffset = 0; int ooffset = 0;
char *ptr; char *ptr;
char *gvar = NULL;
if ((expanded = switch_event_expand_headers(event, (char *) vname)) == vname) { if ((expanded = switch_event_expand_headers(event, (char *) vname)) == vname) {
expanded = NULL; expanded = NULL;
...@@ -1690,6 +1690,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const ...@@ -1690,6 +1690,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
} }
if (!(sub_val = switch_event_get_header(event, vname))) { if (!(sub_val = switch_event_get_header(event, vname))) {
switch_safe_free(gvar);
if ((gvar = switch_core_get_variable_dup(vname))) { if ((gvar = switch_core_get_variable_dup(vname))) {
sub_val = gvar; sub_val = gvar;
} }
...@@ -1713,7 +1714,6 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const ...@@ -1713,7 +1714,6 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
} }
} }
switch_safe_free(gvar);
switch_safe_free(expanded); switch_safe_free(expanded);
} else { } else {
switch_stream_handle_t stream = { 0 }; switch_stream_handle_t stream = { 0 };
...@@ -1789,6 +1789,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const ...@@ -1789,6 +1789,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
} }
} }
free(indup); free(indup);
switch_safe_free(gvar);
return data; return data;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论