Merge branch 'repository-mfile-leak' into 'main'

girepository: Fix a memory leak of a mapped file

See merge request GNOME/glib!3861
This commit is contained in:
Philip Withnall
2024-01-31 12:31:36 +00:00

View File

@@ -1762,6 +1762,7 @@ require_internal (GIRepository *repository,
bytes = g_mapped_file_get_bytes (mfile);
typelib = gi_typelib_new_from_bytes (bytes, &temp_error);
g_bytes_unref (bytes);
g_clear_pointer (&mfile, g_mapped_file_unref);
if (!typelib)
{