Plug a mem leak in data-input-stream test

==12351== 45,045 bytes in 4,095 blocks are definitely lost in loss record 377 of 380
==12351==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==12351==    by 0x4057094: g_malloc (gmem.c:134)
==12351==    by 0x40573DB: g_malloc_n (gmem.c:281)
==12351==    by 0x4071ABD: g_strconcat (gstrfuncs.c:315)
==12351==    by 0x8049811: test_read_lines (data-input-stream.c:99)

Bug #628331.
This commit is contained in:
Christian Persch 2010-09-03 15:53:05 -04:00 committed by Matthias Clasen
parent 36c7d95c9c
commit 45331a4640

View File

@ -96,7 +96,7 @@ test_read_lines (GDataStreamNewlineType newline_type)
/* Add sample data */
for (i = 0; i < MAX_LINES; i++)
g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (base_stream),
g_strconcat (lines[i], endl[newline_type], NULL), -1, NULL);
g_strconcat (lines[i], endl[newline_type], NULL), -1, g_free);
/* Seek to the start */
test_seek_to_start (base_stream);