mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-21 22:50:08 +03:00
Fix freeing of nested documents
Apparently, some libxslt RVTs can contain nested document nodes, see issue #132. I'm not sure how this happens exactly but it can cause a segfault in xmlFreeNodeList after the changes in commit 0762c9b6. Make sure not to touch the (nonexistent) `content` member of xmlDocs.
This commit is contained in:
parent
2c80fc9116
commit
0815302dee
5
tree.c
5
tree.c
@ -3708,6 +3708,11 @@ xmlFreeNodeList(xmlNodePtr cur) {
|
||||
(cur->type != XML_XINCLUDE_START) &&
|
||||
(cur->type != XML_XINCLUDE_END) &&
|
||||
(cur->type != XML_ENTITY_REF_NODE) &&
|
||||
(cur->type != XML_DOCUMENT_NODE) &&
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
(cur->type != XML_DOCB_DOCUMENT_NODE) &&
|
||||
#endif
|
||||
(cur->type != XML_HTML_DOCUMENT_NODE) &&
|
||||
(cur->content != (xmlChar *) &(cur->properties))) {
|
||||
DICT_FREE(cur->content)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user