summaryrefslogtreecommitdiff
path: root/ext/libxml
diff options
context:
space:
mode:
Diffstat (limited to 'ext/libxml')
-rw-r--r--ext/libxml/libxml.c3
-rw-r--r--ext/libxml/tests/bug61367-read.phpt1
2 files changed, 3 insertions, 1 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 9d6c25737..e42d845f9 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -874,7 +874,8 @@ static int php_libxml_post_deactivate()
}
if (LIBXML(stream_context)) {
- zval_ptr_dtor(&LIBXML(stream_context));
+ /* the steam_context resource will be released by resource list destructor */
+ efree(LIBXML(stream_context));
LIBXML(stream_context) = NULL;
}
smart_str_free(&LIBXML(error_buffer));
diff --git a/ext/libxml/tests/bug61367-read.phpt b/ext/libxml/tests/bug61367-read.phpt
index 722b8e704..3deecfc50 100644
--- a/ext/libxml/tests/bug61367-read.phpt
+++ b/ext/libxml/tests/bug61367-read.phpt
@@ -15,6 +15,7 @@ class StreamExploiter {
$doc->resolveExternals = true;
$doc->substituteEntities = true;
$dir = htmlspecialchars(dirname(getcwd()));
+ $dir = str_replace('\\', '/', $dir); // fix for windows
$doc->loadXML( <<<XML
<!DOCTYPE doc [
<!ENTITY file SYSTEM "file:///$dir/bad">