mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
MFB: Fixed Bug #42112 (deleting a node produces memory corruption)
add test
This commit is contained in:
parent
e9af174f6d
commit
7fac5158d7
2 changed files with 35 additions and 1 deletions
|
@ -240,11 +240,14 @@ static void php_libxml_node_free_list(xmlNodePtr node TSRMLS_DC)
|
|||
case XML_ENTITY_REF_NODE:
|
||||
php_libxml_node_free_list((xmlNodePtr) node->properties TSRMLS_CC);
|
||||
break;
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) {
|
||||
xmlRemoveID(node->doc, (xmlAttrPtr) node);
|
||||
}
|
||||
case XML_ATTRIBUTE_DECL:
|
||||
case XML_DTD_NODE:
|
||||
case XML_DOCUMENT_TYPE_NODE:
|
||||
case XML_ENTITY_DECL:
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
case XML_NAMESPACE_DECL:
|
||||
case XML_TEXT_NODE:
|
||||
php_libxml_node_free_list(node->children TSRMLS_CC);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue