[PATCH 2/8] test-isodetect: Fix leak of 'langs' GList

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

 



This fixes:
==12890== 1,032 bytes in 43 blocks are definitely lost in loss record 2,129 of 2,169
==12890==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12890==    by 0x6A514D8: g_malloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890==    by 0x6A68622: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890==    by 0x6A47EA9: g_list_copy_deep (in /usr/lib64/libglib-2.0.so.0.4600.1)
==12890==    by 0x55400A8: osinfo_entity_get_param_value_list (osinfo_entity.c:424)
==12890==    by 0x555476E: osinfo_media_get_languages (osinfo_media.c:1238)
==12890==    by 0x402CCA: test_langs (test-isodetect.c:300)
==12890==    by 0x4031E8: test_one (test-isodetect.c:350)
==12890==    by 0x4033B8: test_windows (test-isodetect.c:387)
==12890==    by 0x532B78A: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==12890==    by 0x532BB7C: srunner_iterate_tcase_tfuns (check_run.c:231)
==12890==    by 0x532BB7C: srunner_run_tcase (check_run.c:373)
==12890==    by 0x532BB7C: srunner_iterate_suites (check_run.c:195)
==12890==    by 0x532BB7C: srunner_run (check_run.c:782)
==12890==    by 0x4037B9: main (test-isodetect.c:496)
---
 test/test-isodetect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/test-isodetect.c b/test/test-isodetect.c
index 9684052..666357a 100644
--- a/test/test-isodetect.c
+++ b/test/test-isodetect.c
@@ -305,6 +305,7 @@ static void test_langs(struct ISOInfo *info)
                     it->data, info->filename);
         g_hash_table_remove(info->langs, it->data);
     }
+    g_list_free(langs);
     fail_unless(g_hash_table_size(info->langs) == 0,
                 "some languages were not identified on ISO %s",
                 info->filename);
-- 
2.5.0

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux