File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -1406,18 +1406,8 @@ PHP_LIBXML_API void php_libxml_node_free_resource(xmlNodePtr node)
1406
1406
default :
1407
1407
if (node -> parent == NULL || node -> type == XML_NAMESPACE_DECL ) {
1408
1408
php_libxml_node_free_list ((xmlNodePtr ) node -> children );
1409
- switch (node -> type ) {
1410
- /* Skip property freeing for the following types */
1411
- case XML_ATTRIBUTE_DECL :
1412
- case XML_DTD_NODE :
1413
- case XML_DOCUMENT_TYPE_NODE :
1414
- case XML_ENTITY_DECL :
1415
- case XML_ATTRIBUTE_NODE :
1416
- case XML_NAMESPACE_DECL :
1417
- case XML_TEXT_NODE :
1418
- break ;
1419
- default :
1420
- php_libxml_node_free_list ((xmlNodePtr ) node -> properties );
1409
+ if (node -> type == XML_ELEMENT_NODE ) {
1410
+ php_libxml_node_free_list ((xmlNodePtr ) node -> properties );
1421
1411
}
1422
1412
php_libxml_unregister_node (node );
1423
1413
php_libxml_node_free (node );
You can’t perform that action at this time.
0 commit comments