This is somewhat wasteful, and there was a TODO in the code, so I took the liberty of reimplementing it. Patch to follow.
Created attachment 4499 [details] [review] don't dump the doc to memory before saving
Thanks for your patch. xmlFreeDoc (document->xml_doc); + xmlFreeNode (document->xml_node_main); + Isn't xmlFreeDoc supposed to free all doc structures, including tree ?
Sorry, that last part slipped in from a new patch that I'm working on.
Comment on attachment 4499 [details] [review] don't dump the doc to memory before saving Ok to commit.
This patch doesn't play well with bug 5314. Please don't commit.
Fixed in master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.