rsvg_handle_dispose(): Free the libxml2 parser context

If the RsvgHandle was written to but not closed, then we'll still have
an XML parser context at dispose time - don't leak it.

Fixes the leak in
parent 88c63cf7
......@@ -2030,12 +2030,12 @@ rsvg_handle_read_stream_sync (RsvgHandle *handle,
goto out;
priv->ctxt = rsvg_free_xml_parser_and_doc (priv->ctxt);
res = TRUE;
priv->ctxt = rsvg_free_xml_parser_and_doc (priv->ctxt);
g_object_unref (stream);
priv->error = NULL;
......@@ -126,6 +126,8 @@ rsvg_handle_dispose (GObject *instance)
self->priv->is_disposed = TRUE;
self->priv->ctxt = rsvg_free_xml_parser_and_doc (self->priv->ctxt);
g_hash_table_destroy (self->priv->entities);
free_nodes (self);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment