diff options
author | Sterling Hughes <sterling@php.net> | 2003-06-05 17:48:51 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2003-06-05 17:48:51 +0000 |
commit | 7b42eccfd6f6c36c2123f1a9d37f48dae2e13386 (patch) | |
tree | 79915ac5374619238c9ce7d07fb41bbbe618b1b9 /ext/xml/xml.c | |
parent | 49bef1ac9ae1c972a06d440b1bfa91dff29da285 (diff) | |
download | php-git-7b42eccfd6f6c36c2123f1a9d37f48dae2e13386.tar.gz |
prevent double destroy and double init badness
Diffstat (limited to 'ext/xml/xml.c')
-rw-r--r-- | ext/xml/xml.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/xml/xml.c b/ext/xml/xml.c index c43ea936c5..7a60a041a2 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -35,6 +35,8 @@ #if HAVE_XML +int xml_parser_inited = 0; + #include "php_xml.h" # include "ext/standard/head.h" @@ -250,7 +252,10 @@ PHP_MSHUTDOWN_FUNCTION(xml) PHP_RSHUTDOWN_FUNCTION(xml) { #ifdef LIBXML_EXPAT_COMPAT - xmlCleanupParser(); + if (xml_parser_inited) { + xmlCleanupParser(); + xml_parser_inited = 0; + } #endif return SUCCESS; } |