mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix dangling pointer with xmllint --dropdtd
Reset doc->intSubset when dropping the DTD.
This commit is contained in:
parent
bf22713507
commit
72b3c067ce
@ -2426,6 +2426,7 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
dtd = xmlGetIntSubset(doc);
|
dtd = xmlGetIntSubset(doc);
|
||||||
if (dtd != NULL) {
|
if (dtd != NULL) {
|
||||||
xmlUnlinkNode((xmlNodePtr)dtd);
|
xmlUnlinkNode((xmlNodePtr)dtd);
|
||||||
|
doc->intSubset = NULL;
|
||||||
xmlFreeDtd(dtd);
|
xmlFreeDtd(dtd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user