summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2018-10-10 08:22:57 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-10 12:55:21 +0200
commit185a1f739b9f6b5b1ee44c768e3a470e5528c57e (patch)
tree9705a8894135546c702e7f466927b4e2ac7717d7 /src/lib/ecore_wl2
parentbc9ffbebb0e2d62b1793e9acf11bd7e36b39e8e9 (diff)
ecore_wl2: fix coverity issue. (Resource Leak)
Module is not freed when eina_module_load is failed. Differential Revision: https://phab.enlightenment.org/D7152
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2.c b/src/lib/ecore_wl2/ecore_wl2.c
index fe447e0cec..81573da85a 100644
--- a/src/lib/ecore_wl2/ecore_wl2.c
+++ b/src/lib/ecore_wl2/ecore_wl2.c
@@ -82,7 +82,14 @@ _ecore_wl2_surface_modules_init(void)
82 { 82 {
83 Eina_Module *local_module = eina_module_new(path); 83 Eina_Module *local_module = eina_module_new(path);
84 EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE); 84 EINA_SAFETY_ON_NULL_RETURN_VAL(local_module, EINA_FALSE);
85 EINA_SAFETY_ON_FALSE_RETURN_VAL(eina_module_load(local_module), EINA_FALSE); 85
86 if (!eina_module_load(local_module))
87 {
88 ERR("Cannot load module %s", local_module->file);
89 eina_module_free(local_module);
90 local_module = NULL;
91 return EINA_FALSE;
92 }
86 return EINA_TRUE; 93 return EINA_TRUE;
87 } 94 }
88 } 95 }