Coverity reports a resource leak here if we successfully load the evas
module as we were never freeing the eina_module here. Previously we
would just return the evas module without proper cleanup of the
eina_module. This patch fixes the leak by calling eina_module_free if
we successfully load the evas module.
Fixes CID1367503
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
em = eina_hash_find(evas_modules[type], name);
if (em)
{
- if (evas_module_load(em)) return em;
+ if (evas_module_load(em))
+ {
+ eina_module_free(en);
+ return em;
+ }
}
eina_module_free(en);