From: Rob Richards Date: Wed, 25 Jan 2006 17:34:05 +0000 (+0000) Subject: fix possible crash in textContent X-Git-Tag: php-5.1.3RC1~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec605ac2ad50188465a694d9d9280f66f8a37538;p=php fix possible crash in textContent --- diff --git a/ext/dom/node.c b/ext/dom/node.c index 09dba97e03..b3856adf53 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -840,10 +840,10 @@ int dom_node_text_content_read(dom_object *obj, zval **retval TSRMLS_DC) if(str != NULL) { ZVAL_STRING(*retval, str, 1); + xmlFree(str); } else { ZVAL_EMPTY_STRING(*retval); } - xmlFree(str); return SUCCESS; }