[Libosinfo] [PATCH 5/8] test-isodetect: Fix GDataInputStream leak in load_iso()
Christophe Fergeau
cfergeau at redhat.com
Thu Nov 5 16:20:43 UTC 2015
This fixes:
==12890== 1,024,600 (15,040 direct, 1,009,560 indirect) bytes in 235 blocks are definitely lost in loss r
==12890== at 0x67E2C88: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C4B7A: ??? (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6A14: g_object_new_valist (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x67C6D80: g_object_new (in /usr/lib64/libgobject-2.0.so.0.4600.1)
==12890== by 0x40244F: load_iso (test-isodetect.c:101)
==12890== by 0x4029B1: load_distro (test-isodetect.c:205)
==12890== by 0x402B28: load_distros (test-isodetect.c:252)
==12890== by 0x402C51: load_isos (test-isodetect.c:283)
==12890== by 0x403058: test_one (test-isodetect.c:331)
==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 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/test/test-isodetect.c b/test/test-isodetect.c
index 67b3b2e..3590205 100644
--- a/test/test-isodetect.c
+++ b/test/test-isodetect.c
@@ -174,6 +174,9 @@ static struct ISOInfo *load_iso(GFile *file, const gchar *shortid, const gchar *
if (fis)
g_object_unref(fis);
+ if (dis)
+ g_object_unref(dis);
+
return info;
error:
--
2.5.0
More information about the Libosinfo
mailing list