summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/wddx/wddx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 948bd7564e..bb95abd78a 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -969,8 +969,8 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
} else if (Z_TYPE_P(ent2->data) == IS_OBJECT) {
zend_class_entry *old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(ent2->data);
- ent1->data->refcount--;
+ EG(scope) = Z_OBJCE_P(ent2->data);
+ Z_DELREF_P(ent1->data);
add_property_zval(ent2->data, ent1->varname, ent1->data);
EG(scope) = old_scope;
} else {