mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-29 08:56:15 +01:00
Use the correct size when freeing unused info
A GIBaseInfo struct can underneath either be GIRealInfo *or* GIUnresolvedInfo if the type is GI_INFO_TYPE_UNRESOLVED. So when we eventually free the structures slice use the correct struct type otherwise things get unhappy.
This commit is contained in:
parent
c87a386cd1
commit
acd55584c2
@ -253,7 +253,10 @@ g_base_info_unref (GIBaseInfo *info)
|
||||
if (rinfo->repository)
|
||||
g_object_unref (rinfo->repository);
|
||||
|
||||
g_slice_free (GIRealInfo, rinfo);
|
||||
if (rinfo->type == GI_INFO_TYPE_UNRESOLVED)
|
||||
g_slice_free (GIUnresolvedInfo, rinfo);
|
||||
else
|
||||
g_slice_free (GIRealInfo, rinfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user