[glib] Plug a mem leak in the memory-input-stream test



commit 53ae72b926e34b22f36fbc162cd12fc4d0bd7028
Author: Christian Persch <chpe gnome org>
Date:   Fri Sep 3 15:30:47 2010 -0400

    Plug a mem leak in the memory-input-stream test
    
    ==2389== 59 (24 direct, 35 indirect) bytes in 1 blocks are definitely lost in loss record 290 of 315
    ==2389==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    ==2389==    by 0x4057094: g_malloc (gmem.c:134)
    ==2389==    by 0x406F2D6: g_slice_alloc (gslice.c:836)
    ==2389==    by 0x406F31B: g_slice_alloc0 (gslice.c:848)
    ==2389==    by 0x403A8A6: g_error_new_literal (gerror.c:117)
    ==2389==    by 0x403AC31: g_set_error_literal (gerror.c:314)
    ==2389==    by 0x41AFD15: g_memory_input_stream_truncate (gmemoryinputstream.c:517)
    ==2389==    by 0x41BAC0F: g_seekable_truncate (gseekable.c:174)
    ==2389==    by 0x8049595: test_truncate (memory-input-stream.c:123)
    
    Bug #628331.

 gio/tests/memory-input-stream.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/memory-input-stream.c b/gio/tests/memory-input-stream.c
index 3bb021c..a111d7a 100644
--- a/gio/tests/memory-input-stream.c
+++ b/gio/tests/memory-input-stream.c
@@ -122,6 +122,7 @@ test_truncate (void)
   error = NULL;
   g_assert (!g_seekable_truncate (G_SEEKABLE (stream), 26, NULL, &error));
   g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
+  g_error_free (error);
 
   g_object_unref (stream);
 }



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