girepository: Fix leak in write_vfunc_info

Found by Coverity.

https://bugzilla.redhat.com/show_bug.cgi?id=1938731
This commit is contained in:
David King 2021-05-20 12:40:23 +01:00 committed by Emmanuele Bassi
parent 16b064bea9
commit 3ebf2f5140

View File

@ -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);