Plug a mem leak in data-output-stream test
authorChristian Persch <chpe@gnome.org>
Fri, 3 Sep 2010 19:53:56 +0000 (15:53 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 3 Sep 2010 19:53:56 +0000 (15:53 -0400)
==2426== 45,034 bytes in 4,094 blocks are definitely lost in loss record 358 of 361
==2426==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==2426==    by 0x4057094: g_malloc (gmem.c:134)
==2426==    by 0x40573DB: g_malloc_n (gmem.c:281)
==2426==    by 0x4071ABD: g_strconcat (gstrfuncs.c:315)
==2426==    by 0x804916A: test_read_lines (data-output-stream.c:83)

Bug #628331.

gio/tests/data-output-stream.c

index 7acaa02..887f461 100644 (file)
@@ -85,6 +85,7 @@ test_read_lines (GDataStreamNewlineType newline_type)
       g_stpcpy ((char*)(lines + i*strlen(s)), s);
       g_assert_no_error (error);
       g_assert (res == TRUE);
+      g_free (s);
     }
 
   /*  Byte order testing */