[libgxps] Fixed memory leak in render_end_element()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] Fixed memory leak in render_end_element()
- Date: Fri, 29 Jul 2011 09:21:30 +0000 (UTC)
commit c926d7c2de6c0bb37ba562936bad0522fcea4319
Author: Jason Crain <jason aquaticape us>
Date: Fri Jul 29 01:42:22 2011 -0500
Fixed memory leak in render_end_element()
Call gxps_path_free in more places
libgxps/gxps-page.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libgxps/gxps-page.c b/libgxps/gxps-page.c
index 865f0c0..3dc9920 100644
--- a/libgxps/gxps-page.c
+++ b/libgxps/gxps-page.c
@@ -2487,20 +2487,25 @@ render_end_element (GMarkupParseContext *context,
if (!path->data) {
LOG (g_print ("restore\n"));
cairo_restore (ctx->cr);
+ gxps_path_free (path);
return;
}
cairo_set_fill_rule (ctx->cr, path->fill_rule);
if (path->clip_data) {
- if (!path_data_parse (path->clip_data, ctx->cr, error))
+ if (!path_data_parse (path->clip_data, ctx->cr, error)) {
+ gxps_path_free (path);
return;
+ }
LOG (g_print ("clip\n"));
cairo_clip (ctx->cr);
}
- if (!path_data_parse (path->data, ctx->cr, error))
+ if (!path_data_parse (path->data, ctx->cr, error)) {
+ gxps_path_free (path);
return;
+ }
if (path->fill_pattern) {
LOG (g_print ("fill\n"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]