KWARC / rust-libxml

Rust wrapper for libxml2
https://crates.io/crates/libxml
MIT License
76 stars 38 forks source link

fixing a memory leak when converting the xml to a string #100

Closed scooterman closed 2 years ago

scooterman commented 2 years ago

The title says it, this change fixes a memory leak when dealing with the serialization of a document back to string.

dginev commented 2 years ago

Thanks for patching this @scooterman !

Indeed, taking a closer look at the xmlsave docs, we've simply used the wrong method here (or omitted a call to free, either way).