[PATCH 06/14] productfilter: Free 'supportDate' in ::finalize()

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

 



This fixes:
==4878== 8 bytes in 1 blocks are definitely lost in loss record 8 of 319
==4878==    at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==4878==    by 0x6849E58: g_malloc (gmem.c:94)
==4878==    by 0x682A114: g_date_new_dmy (gdate.c:289)
==4878==    by 0x5335C6D: osinfo_productfilter_add_support_date_constraint (osinfo_productfilter.c:210)
==4878==    by 0x401E8B: test_supportdate (test-product.c:171)
==4878==    by 0x5117535: tcase_run_tfun_nofork.isra.9 (check_run.c:390)
==4878==    by 0x51178EB: srunner_iterate_tcase_tfuns (check_run.c:231)
==4878==    by 0x51178EB: srunner_run_tcase (check_run.c:373)
==4878==    by 0x51178EB: srunner_iterate_suites (check_run.c:195)
==4878==    by 0x51178EB: srunner_run (check_run.c:782)
==4878==    by 0x40165E: main (test-product.c:221)
---
 osinfo/osinfo_productfilter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/osinfo/osinfo_productfilter.c b/osinfo/osinfo_productfilter.c
index 70f4a91..16976c2 100644
--- a/osinfo/osinfo_productfilter.c
+++ b/osinfo/osinfo_productfilter.c
@@ -62,6 +62,9 @@ osinfo_productfilter_finalize(GObject *object)
 
     g_hash_table_unref(productfilter->priv->productConstraints);
 
+    if (productfilter->priv->supportDate)
+        g_date_free(productfilter->priv->supportDate);
+
     /* Chain up to the parent class */
     G_OBJECT_CLASS(osinfo_productfilter_parent_class)->finalize(object);
 }
-- 
2.7.4

_______________________________________________
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