[glib] Plug a mem leak in data-output-stream test



commit 05d6fcf88cee64e168e978800fb66523c36a94fc
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:53:56 2010 -0400

    Plug a mem leak in data-output-stream test
    
    ==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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/data-output-stream.c b/gio/tests/data-output-stream.c
index 7acaa02..887f461 100644
--- a/gio/tests/data-output-stream.c
+++ b/gio/tests/data-output-stream.c
@@ -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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]