We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1a48a8 commit 3fa00beCopy full SHA for 3fa00be
rsvg/src/xml/mod.rs
@@ -86,6 +86,13 @@ struct XmlEntity(xmlEntityPtr);
86
impl Drop for XmlEntity {
87
fn drop(&mut self) {
88
unsafe {
89
+ // Even though we are freeing an xmlEntityPtr, historically the code has always
90
+ // used xmlFreeNode() because that function actually does allow freeing entities.
91
+ //
92
+ // See https://gitlab.gnome.org/GNOME/libxml2/-/issues/731
93
+ // for a possible memory leak on older versions of libxml2 when using
94
+ // xmlFreeNode() instead of xmlFreeEntity() - the latter just became public
95
+ // in librsvg-2.12.0.
96
xmlFreeNode(self.0);
97
}
98
0 commit comments