Skip to content

Commit a67912a

Browse files
committed
Ignore xmlDefaultExternalEntityLoader leaks
At least on Windows with libxml2 2.11.9, calling the default entity loader leaks a couple of bytes. Since we cannot do anything about that, we ignore these leaks.
1 parent 01aeaf2 commit a67912a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/libxml/libxml.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,10 @@ static xmlParserInputPtr _php_libxml_external_entity_loader(const char *URL,
721721

722722
/* no custom user-land callback set up; delegate to original loader */
723723
if (!ZEND_FCC_INITIALIZED(LIBXML(entity_loader_callback))) {
724-
return _php_libxml_default_entity_loader(URL, ID, context);
724+
ZEND_IGNORE_LEAKS_BEGIN();
725+
ret = _php_libxml_default_entity_loader(URL, ID, context);
726+
ZEND_IGNORE_LEAKS_END();
727+
return ret;
725728
}
726729

727730
if (ID != NULL) {

0 commit comments

Comments
 (0)