Skip to content

Commit c9c904f

Browse files
committed
xml: Migrate _ns_separator to ZendMM
1 parent f63b011 commit c9c904f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/xml/compat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m
465465
/* Note: sax2 flag will be set due to the magic number in `initialized` in php_xml_compat_handlers */
466466
ZEND_ASSERT(parser->parser->sax->initialized == XML_SAX2_MAGIC);
467467
parser->use_namespace = 1;
468-
parser->_ns_separator = xmlStrdup(sep);
468+
parser->_ns_separator = BAD_CAST estrdup((const char *) sep);
469469
} else {
470470
/* Reset flag as XML_SAX2_MAGIC is needed for xmlCreatePushParserCtxt
471471
so must be set in the handlers */
@@ -718,7 +718,7 @@ XML_ParserFree(XML_Parser parser)
718718
{
719719
if (parser->use_namespace) {
720720
if (parser->_ns_separator) {
721-
xmlFree(parser->_ns_separator);
721+
efree(parser->_ns_separator);
722722
}
723723
}
724724
if (parser->parser->myDoc) {

0 commit comments

Comments
 (0)