From d550c270ce7c8a5ecbbbcff850553ff7689f6271 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 4 Jul 2006 07:26:53 +0000 Subject: [PATCH] Fixed memory leak --- ext/libxml/libxml.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 1e373f664d..7326d57a3c 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -657,6 +657,10 @@ PHP_RSHUTDOWN_FUNCTION(libxml) xmlParserInputBufferCreateFilenameDefault(NULL); xmlOutputBufferCreateFilenameDefault(NULL); + if (LIBXML(stream_context)) { + zval_ptr_dtor(&LIBXML(stream_context)); + LIBXML(stream_context) = NULL; + } smart_str_free(&LIBXML(error_buffer)); if (LIBXML(error_list)) { zend_llist_destroy(LIBXML(error_list)); -- 2.40.0