[librsvg] Plug mem leaks in rsvg-view
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Plug mem leaks in rsvg-view
- Date: Mon, 7 Nov 2011 19:25:41 +0000 (UTC)
commit 4b5e4323b88782e3aa555313eb3cd4ac258b7cb4
Author: Christian Persch <chpe gnome org>
Date: Wed Sep 7 12:13:06 2011 +0200
Plug mem leaks in rsvg-view
==10734== 19 (8 direct, 11 indirect) bytes in 1 blocks are definitely lost in loss record 1,325 of 2,962
==10734== at 0x4026EB4: malloc (vg_replace_malloc.c:236)
==10734== by 0x4B3B823: g_malloc (gmem.c:164)
==10734== by 0x4B40A76: parse_arg (goption.c:1242)
==10734== by 0x4B42123: g_option_context_parse (goption.c:1572)
==10734== by 0x804C39B: main (test-display.c:784)
==10734==
==10734== 40 (24 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 2,103 of 2,962
==10734== at 0x4026EB4: malloc (vg_replace_malloc.c:236)
==10734== by 0x4B3B823: g_malloc (gmem.c:164)
==10734== by 0x4B51726: g_slice_alloc (gslice.c:842)
==10734== by 0x4B07158: g_array_sized_new (garray.c:185)
==10734== by 0x4B07275: g_byte_array_new (garray.c:1402)
==10734== by 0x4034F0C: rsvg_acquire_file_resource (rsvg-image.c:109)
==10734== by 0x403512A: _rsvg_acquire_xlink_href_resource (rsvg-image.c:174)
==10734== by 0x804C59B: main (test-display.c:837)
test-display.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/test-display.c b/test-display.c
index 6594dec..89d6de8 100644
--- a/test-display.c
+++ b/test-display.c
@@ -718,6 +718,7 @@ view_pixbuf (ViewerCbInfo * info, int xid, const char *color)
int
main (int argc, char **argv)
{
+ int retval = 1;
GError *err = NULL;
GOptionContext *g_option_context;
double x_zoom = 1.0;
@@ -895,9 +896,11 @@ main (int argc, char **argv)
g_print ("\n");
- return 1;
+ goto done;
}
+ retval = 0;
+
info.accel_group = gtk_accel_group_new ();
view_pixbuf (&info, xid, bg_color);
@@ -906,8 +909,11 @@ main (int argc, char **argv)
gtk_main ();
g_object_unref (info.pixbuf);
+
+ done:
g_byte_array_free (info.svg_bytes, TRUE);
+ g_strfreev (args);
rsvg_term ();
- return 0;
+ return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]