From f3b8d2771dc9689a3e8a9f1a34337992946d7a84 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 20 May 2021 12:40:23 +0100 Subject: girepository: Fix leak in write_vfunc_info Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938731 --- girepository/girwriter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/girepository/girwriter.c b/girepository/girwriter.c index cc14280b..d092df10 100644 --- a/girepository/girwriter.c +++ b/girepository/girwriter.c @@ -923,7 +923,10 @@ write_vfunc_info (const gchar *namespace, xml_printf (file, " offset=\"%d\"", offset); if (invoker) - xml_printf (file, " invoker=\"%s\"", g_base_info_get_name ((GIBaseInfo*)invoker)); + { + xml_printf (file, " invoker=\"%s\"", g_base_info_get_name ((GIBaseInfo*)invoker)); + g_base_info_unref ((GIBaseInfo *)invoker); + } write_callable_info (namespace, (GICallableInfo*)info, file); -- cgit v1.2.1