> > Maybe we can call explicitly xmlFreeDoc instead xmlFreeNode > > > > some like > > > > if (cur_copy->type == XML_DOCUMENT_NODE) > > xmlFreeDoc((xmlDocPtr) cur_copy); > > else > > xmlFreeNode(cur_copy); > > > > This looks most correct fix for me. What do you think? > > Seems like that should work, yeah ...
Something like this perhaps? Less repetitive ...
Thank you for commit.
the commit message is not correct. xmlCopyNodes does owns works well, but the node is broken already, and because we should to call xmlFreeNode, we have a problem.