Always copy the filename of extension modules

There's a suspected memory corruption otherwise.
This commit is contained in:
Christian Dywan 2012-07-12 22:53:54 +02:00
parent 23f9fa606a
commit 00ca0c4687

View file

@ -1246,7 +1246,7 @@ midori_load_module (MidoriApp* app,
modules = g_hash_table_new (g_direct_hash, g_direct_equal); modules = g_hash_table_new (g_direct_hash, g_direct_equal);
if (g_hash_table_contains (modules, module)) if (g_hash_table_contains (modules, module))
return; return;
g_hash_table_insert (modules, module, (gchar*)filename); g_hash_table_insert (modules, module, g_strdup (filename));
if (module && g_module_symbol (module, "extension_init", if (module && g_module_symbol (module, "extension_init",
(gpointer) &extension_init) (gpointer) &extension_init)