[librsvg] Call xmlFreeParserCtxt after using the context.
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Call xmlFreeParserCtxt after using the context.
- Date: Thu, 28 Jul 2011 09:44:54 +0000 (UTC)
commit 026a635af8fc4ec90766944c04d3277c1b9f9d70
Author: Hiroyuki Ikezoe <hiikezoe gnome org>
Date: Thu Jul 28 15:42:45 2011 +0900
Call xmlFreeParserCtxt after using the context.
GNOME Bug #655472
rsvg-base.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 9fd065a..1f5c48c 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1193,13 +1193,15 @@ rsvg_handle_close_impl (RsvgHandle * handle, GError ** error)
xmlDoc = handle->priv->ctxt->myDoc;
result = xmlParseChunk (handle->priv->ctxt, "", 0, TRUE);
- xmlFreeParserCtxt (handle->priv->ctxt);
- xmlFreeDoc (xmlDoc);
-
if (result != 0) {
rsvg_set_error (error, handle->priv->ctxt);
+ xmlFreeParserCtxt (handle->priv->ctxt);
+ xmlFreeDoc (xmlDoc);
return FALSE;
}
+
+ xmlFreeParserCtxt (handle->priv->ctxt);
+ xmlFreeDoc (xmlDoc);
}
rsvg_defs_resolve_all (handle->priv->defs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]