]> granicus.if.org Git - php/commitdiff
This shouldn't be refcount = 0, causes a memory overrun
authorSterling Hughes <sterling@php.net>
Sat, 14 Jun 2003 04:02:12 +0000 (04:02 +0000)
committerSterling Hughes <sterling@php.net>
Sat, 14 Jun 2003 04:02:12 +0000 (04:02 +0000)
ext/simplexml/simplexml.c

index 8f7fce0a67458e9ceecc81e81b3fe6ad47d188b1..4b31ae8bd032b3a6ebdfacc4c4e624964f3a5f4b 100644 (file)
@@ -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);