1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Fix dangling pointer with xmllint --dropdtd

Reset doc->intSubset when dropping the DTD.
This commit is contained in:
Nick Wellnhofer
2021-04-22 19:24:50 +02:00
parent bf22713507
commit 72b3c067ce

View File

@@ -2426,6 +2426,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
dtd = xmlGetIntSubset(doc);
if (dtd != NULL) {
xmlUnlinkNode((xmlNodePtr)dtd);
doc->intSubset = NULL;
xmlFreeDtd(dtd);
}
}