Den 2017-11-06 kl. 15:06, skrev Mat D:If you use the C++ library, libxml++, don't call xmlFreeDtd() or xmlFreeDoc() yourself. Let the C++ classes do that. If you want to free a DTD or a document, delete the corresponding xmlpp::Dtd or xmlpp::Document instance. If you use the C library, libxml2, directly, clear the pointer after the call to xmlFreeDtd() or xmlFreeDoc(). xmlFreeDoc(mydoc); mydoc = nullptr; // mydoc = NULL; if you use a C compiler. Any access to freed memory is an error. /Kjell |