[glib] Plug a mem leak in data-input-stream test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Plug a mem leak in data-input-stream test
- Date: Fri, 3 Sep 2010 20:19:17 +0000 (UTC)
commit 45331a46408777fc6a888302bad216cedbb16635
Author: Christian Persch <chpe gnome org>
Date: Fri Sep 3 15:53:05 2010 -0400
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.
gio/tests/data-input-stream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/data-input-stream.c b/gio/tests/data-input-stream.c
index 2de5bb9..bc9e4ea 100644
--- a/gio/tests/data-input-stream.c
+++ b/gio/tests/data-input-stream.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]