summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/wddx/wddx.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 097c691de1..f0869282f1 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -784,6 +784,7 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X
if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp((char *)atts[i], EL_NAME) && atts[++i] && atts[i][0]) {
+ if (stack->varname) efree(stack->varname);
stack->varname = estrdup((char *)atts[i]);
break;
}
@@ -1007,13 +1008,6 @@ static void php_wddx_process_data(void *user_data, const XML_Char *s, int len)
break;
case ST_BOOLEAN:
- if (IS_UNDEF == Z_TYPE(ent->data)) {
- if (ent->varname) {
- efree(ent->varname);
- ent->varname = NULL;
- }
- break;
- }
if (!strcmp((char *)s, "true")) {
Z_LVAL(ent->data) = 1;
} else if (!strcmp((char *)s, "false")) {