From cc0c4e4981e636fafeaee85e0111781e58f6b2f5 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Sat, 14 Jun 2003 04:02:12 +0000 Subject: [PATCH] This shouldn't be refcount = 0, causes a memory overrun --- ext/simplexml/simplexml.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 8f7fce0a67..4b31ae8bd0 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -97,11 +97,10 @@ static zval * sxe_property_read(zval *object, zval *member TSRMLS_DC) { zval *return_value; - zval *value; + zval *value = NULL; php_sxe_object *sxe; char *name; char *contents; - char *mapname = NULL; xmlNodePtr node; xmlAttrPtr attr; int counter = 0; @@ -122,7 +121,6 @@ sxe_property_read(zval *object, zval *member TSRMLS_DC) APPEND_PREV_ELEMENT(counter, value); MAKE_STD_ZVAL(value); - value->refcount = 0; contents = xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, attr->children, 1); ZVAL_STRING(value, contents, 0); APPEND_CUR_ELEMENT(counter, value); -- 2.50.1