+2017-05-15 Sylvestre Ledru <sylvestre@debian.org>
+
+ plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637)
+
2017-05-15 Uros Bizjak <ubizjak@gmail.com>
PR target/80425
if ((err = dlerror ()) != NULL)
{
+ dlclose(dl_handle);
error ("cannot find %s in plugin %s\n%s", str_plugin_init_func_name,
plugin->full_name, err);
return false;
/* Call the plugin-provided initialization routine with the arguments. */
if ((*plugin_init) (plugin, &gcc_version))
{
+ dlclose(dl_handle);
error ("fail to initialize plugin %s", plugin->full_name);
return false;
}
-
+ /* leak dl_handle on purpose to ensure the plugin is loaded for the
+ entire run of the compiler. */
return true;
}