mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-15 04:05:11 +01:00
Merge branch 'leaks' into 'main'
Fix GIOModule regression from !2959 See merge request GNOME/glib!2970
This commit is contained in:
commit
47ab384fd9
@ -579,11 +579,17 @@ g_io_modules_scan_all_in_directory_with_scope (const char *dirname,
|
|||||||
{
|
{
|
||||||
/* Try to load and init types */
|
/* Try to load and init types */
|
||||||
if (g_type_module_use (G_TYPE_MODULE (module)))
|
if (g_type_module_use (G_TYPE_MODULE (module)))
|
||||||
|
{
|
||||||
g_type_module_unuse (G_TYPE_MODULE (module)); /* Unload */
|
g_type_module_unuse (G_TYPE_MODULE (module)); /* Unload */
|
||||||
|
/* module must remain alive, because the type system keeps weak refs */
|
||||||
|
g_ignore_leak (module);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
g_printerr ("Failed to load module: %s\n", path);
|
g_printerr ("Failed to load module: %s\n", path);
|
||||||
g_object_unref (module);
|
g_object_unref (module);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user