Plug a mem leak in converter-stream test
authorChristian Persch <chpe@gnome.org>
Fri, 3 Sep 2010 19:37:56 +0000 (15:37 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Sep 2010 19:37:56 +0000 (15:37 -0400)
==2396== 39 (24 direct, 15 indirect) bytes in 1 blocks are definitely lost in loss record 398 of 625
==2396==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2396==    by 0x4057094: g_malloc (gmem.c:134)
==2396==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
==2396==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
==2396==    by 0x403A8A6: g_error_new_literal (gerror.c:117)
==2396==    by 0x403AC31: g_set_error_literal (gerror.c:314)
==2396==    by 0x80498F7: g_compressor_converter_convert (converter-stream.c:244)
==2396==    by 0x417BF67: g_converter_convert (gconverter.c:174)
==2396==    by 0x417CBDE: g_converter_input_stream_read (gconverterinputstream.c:460)
==2396==    by 0x41A7A17: g_input_stream_read (ginputstream.c:204)
==2396==    by 0x804A832: test_compressor (converter-stream.c:545)

Bug #628331.

gio/tests/converter-stream.c

index e5d18ed..6e7fde1 100644 (file)
@@ -548,6 +548,7 @@ test_compressor (void)
       if (res == -1)
        {
          g_assert_error (error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT);
+          g_error_free (error);
          break;
        }