GNOME Bugzilla – Bug 694390
Assertion when calling grl_registry_unload_plugin() twice
Last modified: 2013-02-22 16:37:44 UTC
Created attachment 237113 [details] [review] Fix double-free protection assert when unloading a plugin twice When calling grl_registry_unload_plugin() twice, g_module_close() throws the following exception on the second call: GModule-CRITICAL **: g_module_close: assertion `module->ref_count > 0' failed Attached is a patch to prevent this by unsetting the plugin's module member just after g_module_close() is called on it.
commit 1c2a33adb18d25b9214c3a9859e72bf3bc01af0d Author: Mike Ruprecht <mike.ruprecht@collabora.co.uk> Date: Thu Feb 21 15:39:28 2013 -0600 core: Fix double-free protection assert when unloading a plugin twice When calling g_module_close() twice on the same module, it throws a g_return_if_fail() assertion stating ref_count > 0 fails. It's effectively like g_object_unref(). This patch prevents g_module_close() being called twice on the same module by unsetting it from the plugin instance when closing it in grl_registry_unload_plugin(). https://bugzilla.gnome.org/show_bug.cgi?id=694390 src/grl-registry.c | 1 + 1 file changed, 1 insertion(+)