From 24bee1a130152dece7f7ae470b81bd6ed69a9a4f Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 3 Sep 2010 15:40:55 -0400 Subject: [PATCH] Plug a mem leak in convert-stream test ==7540== 487 (64 direct, 423 indirect) bytes in 2 blocks are definitely lost in loss record 597 of 615 ==7540== at 0x4005BDC: malloc (vg_replace_malloc.c:195) ==7540== by 0x4057094: g_malloc (gmem.c:134) ==7540== by 0x406F2D6: g_slice_alloc (gslice.c:836) ==7540== by 0x406F31B: g_slice_alloc0 (gslice.c:848) ==7540== by 0x413D5BB: g_type_create_instance (gtype.c:1867) ==7540== by 0x412372A: g_object_constructor (gobject.c:1482) ==7540== by 0x4123147: g_object_newv (gobject.c:1347) ==7540== by 0x41236BB: g_object_new_valist (gobject.c:1463) ==7540== by 0x41A756E: g_initable_new_valist (ginitable.c:214) ==7540== by 0x41A743E: g_initable_new (ginitable.c:138) ==7540== by 0x417B67A: g_charset_converter_new (gcharsetconverter.c:215) ==7540== by 0x804B043: test_charset (converter-stream.c:675) Bug #628331. --- gio/tests/converter-stream.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c index c2625adf4..b66c5e518 100644 --- a/gio/tests/converter-stream.c +++ b/gio/tests/converter-stream.c @@ -700,7 +700,10 @@ test_charset (gconstpointer data) g_object_unref (in); if (test->n_fallbacks == 0) - return; + { + g_object_unref (conv); + return; + } g_converter_reset (conv);