diff --git a/ext/nokogiri/xml_document.c b/ext/nokogiri/xml_document.c index 1850849251..1d2119c80f 100644 --- a/ext/nokogiri/xml_document.c +++ b/ext/nokogiri/xml_document.c @@ -9,6 +9,9 @@ static int dealloc_node_i(xmlNodePtr key, xmlNodePtr node, xmlDocPtr doc) case XML_NAMESPACE_DECL: xmlFreeNs((xmlNsPtr)node); break; + case XML_DTD_NODE: + xmlFreeDtd((xmlDtdPtr)node); + break; default: if(node->parent == NULL) { xmlAddChild((xmlNodePtr)doc, node);