[librest/wip/teuf/gtask: 25/28] tests/flickr: Fix various leaks



commit 81c5793c003b0228adcb8c63692b15b2cf7d82ee
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Mon Jun 20 12:08:33 2016 +0200

    tests/flickr: Fix various leaks
    
    ==16230== 24 bytes in 1 blocks are definitely lost in loss record 1,292 of 3,425
    ==16230==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
    ==16230==    by 0x5F5CE58: g_malloc (gmem.c:94)
    ==16230==    by 0x5F73D42: g_slice_alloc (gslice.c:1025)
    ==16230==    by 0x5F7436D: g_slice_alloc0 (gslice.c:1051)
    ==16230==    by 0x5CEE821: g_type_create_instance (gtype.c:1857)
    ==16230==    by 0x5CD06AA: g_object_new_internal (gobject.c:1781)
    ==16230==    by 0x5CD20CC: g_object_newv (gobject.c:1928)
    ==16230==    by 0x5CD28B3: g_object_new (gobject.c:1621)
    ==16230==    by 0x4E4557B: rest_xml_parser_new (rest-xml-parser.c:62)
    ==16230==    by 0x401126: test_flickr (flickr.c:62)
    ==16230==    by 0x5F7C983: test_case_run (gtestutils.c:2158)
    ==16230==    by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241)
    ==16230==    by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253)
    ==16230==    by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328)
    ==16230==    by 0x5F7CD80: g_test_run (gtestutils.c:1596)
    ==16230==    by 0x40169A: main (flickr.c:115)
    ==16230==
    ==16230== 24 bytes in 1 blocks are definitely lost in loss record 1,293 of 3,425
    ==16230==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
    ==16230==    by 0x5F5CE58: g_malloc (gmem.c:94)
    ==16230==    by 0x5F73D42: g_slice_alloc (gslice.c:1025)
    ==16230==    by 0x5F7436D: g_slice_alloc0 (gslice.c:1051)
    ==16230==    by 0x5CEE821: g_type_create_instance (gtype.c:1857)
    ==16230==    by 0x5CD06AA: g_object_new_internal (gobject.c:1781)
    ==16230==    by 0x5CD20CC: g_object_newv (gobject.c:1928)
    ==16230==    by 0x5CD28B3: g_object_new (gobject.c:1621)
    ==16230==    by 0x4E4557B: rest_xml_parser_new (rest-xml-parser.c:62)
    ==16230==    by 0x40142C: test_flickr (flickr.c:90)
    ==16230==    by 0x5F7C983: test_case_run (gtestutils.c:2158)
    ==16230==    by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241)
    ==16230==    by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253)
    ==16230==    by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328)
    ==16230==    by 0x5F7CD80: g_test_run (gtestutils.c:1596)
    ==16230==    by 0x40169A: main (flickr.c:115)
    ==16230==
    ==16230== 1,010 (48 direct, 962 indirect) bytes in 1 blocks are definitely lost in loss record 3,333 of 
3,425
    ==16230==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
    ==16230==    by 0x5F5CE58: g_malloc (gmem.c:94)
    ==16230==    by 0x5F73D42: g_slice_alloc (gslice.c:1025)
    ==16230==    by 0x5F7436D: g_slice_alloc0 (gslice.c:1051)
    ==16230==    by 0x4E44C8D: _rest_xml_node_new (rest-xml-node.c:126)
    ==16230==    by 0x4E45763: rest_xml_parser_parse_from_data (rest-xml-parser.c:118)
    ==16230==    by 0x401460: test_flickr (flickr.c:91)
    ==16230==    by 0x5F7C983: test_case_run (gtestutils.c:2158)
    ==16230==    by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241)
    ==16230==    by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253)
    ==16230==    by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328)
    ==16230==    by 0x5F7CD80: g_test_run (gtestutils.c:1596)
    ==16230==    by 0x40169A: main (flickr.c:115)
    ==16230==
    ==16230== 2,516 (32 direct, 2,484 indirect) bytes in 1 blocks are definitely lost in loss record 3,370 of 
3,425
    ==16230==    at 0x5CEE964: g_type_create_instance (gtype.c:1854)
    ==16230==    by 0x5CD06AA: g_object_new_internal (gobject.c:1781)
    ==16230==    by 0x5CD25ED: g_object_new_valist (gobject.c:2040)
    ==16230==    by 0x5CD28A0: g_object_new (gobject.c:1624)
    ==16230==    by 0x50524F8: _new_call (flickr-proxy.c:59)
    ==16230==    by 0x4E40601: rest_proxy_new_call (rest-proxy.c:584)
    ==16230==    by 0x4013BF: test_flickr (flickr.c:85)
    ==16230==    by 0x5F7C983: test_case_run (gtestutils.c:2158)
    ==16230==    by 0x5F7C983: g_test_run_suite_internal (gtestutils.c:2241)
    ==16230==    by 0x5F7CB4E: g_test_run_suite_internal (gtestutils.c:2253)
    ==16230==    by 0x5F7CD5D: g_test_run_suite (gtestutils.c:2328)
    ==16230==    by 0x5F7CD80: g_test_run (gtestutils.c:1596)
    ==16230==    by 0x40169A: main (flickr.c:115)

 tests/flickr.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tests/flickr.c b/tests/flickr.c
index a555b35..11301fa 100644
--- a/tests/flickr.c
+++ b/tests/flickr.c
@@ -77,6 +77,7 @@ test_flickr ()
 
   rest_xml_node_unref (root);
   g_object_unref (call);
+  g_object_unref (parser);
 
   /*
    * Test a call which requires a signature.
@@ -100,7 +101,10 @@ test_flickr ()
   g_assert_nonnull (node->content);
   g_assert_cmpstr (node->content, !=, "");
 
+  rest_xml_node_unref (root);
+  g_object_unref (call);
   g_object_unref (proxy);
+  g_object_unref (parser);
 
 }
 


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