doh regression

This commit is contained in:
Anthony Minessale 2011-02-03 11:19:24 -06:00
parent 74a0cfd1e1
commit e5fb456f3b
1 changed files with 3 additions and 2 deletions

View File

@ -1561,6 +1561,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
char *cloned_sub_val = NULL;
char *func_val = NULL;
int nv = 0;
char *gvar = NULL;
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
int offset = 0;
int ooffset = 0;
char *ptr;
char *gvar = NULL;
if ((expanded = switch_event_expand_headers(event, (char *) vname)) == vname) {
expanded = NULL;
@ -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))) {
switch_safe_free(gvar);
if ((gvar = switch_core_get_variable_dup(vname))) {
sub_val = gvar;
}
@ -1713,7 +1714,6 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
}
}
switch_safe_free(gvar);
switch_safe_free(expanded);
} else {
switch_stream_handle_t stream = { 0 };
@ -1789,6 +1789,7 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const
}
}
free(indup);
switch_safe_free(gvar);
return data;
}