forked from enlightenment/efl
ecore_wl2: fix coverity issue. (Resource Leak)
Module is not freed when eina_module_load is failed. Differential Revision: https://phab.enlightenment.org/D7152
This commit is contained in:
parent
bc9ffbebb0
commit
185a1f739b
|
@ -82,7 +82,14 @@ _ecore_wl2_surface_modules_init(void)
|
|||
{
|
||||
Eina_Module *local_module = eina_module_new(path);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE);
|
||||
EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_module_load(local_module), EINA_FALSE);
|
||||
|
||||
if (!eina_module_load(local_module))
|
||||
{
|
||||
ERR("Cannot load module %s", local_module->file);
|
||||
eina_module_free(local_module);
|
||||
local_module = NULL;
|
||||
return EINA_FALSE;
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue