]> granicus.if.org Git - php/commitdiff
MFB: free wholetext properly
authorRob Richards <rrichards@php.net>
Mon, 14 May 2007 11:54:58 +0000 (11:54 +0000)
committerRob Richards <rrichards@php.net>
Mon, 14 May 2007 11:54:58 +0000 (11:54 +0000)
ext/dom/text.c

index f420271a9281045d01fa8af8d9ca9fd6d6a4bdca..43309ae9f78952e12a9bdae624412cf18bc36ffa 100644 (file)
@@ -110,12 +110,11 @@ int dom_text_whole_text_read(dom_object *obj, zval **retval TSRMLS_DC)
        ALLOC_ZVAL(*retval);
        if (wholetext != NULL) {
                ZVAL_XML_STRING(*retval, wholetext, ZSTR_DUPLICATE);
+               xmlFree(wholetext);
        } else {
                ZVAL_EMPTY_STRING(*retval);
        }
 
-       xmlFree(wholetext);
-
        return SUCCESS;
 }