From def8bc92fc8c1d09e6479646a39044f70e68801b Mon Sep 17 00:00:00 2001 From: Christian Stocker Date: Sat, 18 May 2002 14:38:22 +0000 Subject: [PATCH] mem leak fix for domxml_dump_node --- ext/domxml/php_domxml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index bc552f2332..5f2404cefd 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -3184,7 +3184,8 @@ PHP_FUNCTION(domxml_dump_mem) if (!size) { RETURN_FALSE; } - RETURN_STRINGL(mem, size, 1); + RETVAL_STRINGL(mem, size, 1); + xmlFree(mem); } /* }}} */ @@ -3253,7 +3254,6 @@ PHP_FUNCTION(domxml_dump_node) RETURN_FALSE; } RETVAL_STRING(mem, 1); - xmlBufferFree(buf); } -- 2.40.0