mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 18:22:11 +01:00
girepository: Fix a memory leak of a mapped file
This was introduced by me in commit 1eec66c8989f418e5254808dc899ae540ba0e89d, as the ownership transfer semantics of `gi_typelib_new_from_mapped_file()` were not blatant. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3237
This commit is contained in:
parent
5f345a2653
commit
d5954664f2
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user