q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=198a61c37d972ad3f62d65ef4fe85722bcb6c000

commit 198a61c37d972ad3f62d65ef4fe85722bcb6c000
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Wed Jul 16 00:30:48 2014 +0100

    eolian: fix memory leak
---
 src/lib/eolian/database_fill.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index 5fd2556..af7ea1c 100644
--- a/src/lib/eolian/database_fill.c
+++ b/src/lib/eolian/database_fill.c
@@ -202,9 +202,9 @@ _db_fill_property(Eolian_Class *cl, Eo_Class_Def *kls, 
Eo_Property_Def *prop)
 
    database_function_scope_set(foo_id, prop->scope);
 
-   if (!_db_fill_keys     (foo_id,      prop)) return EINA_FALSE;
-   if (!_db_fill_values   (foo_id,      prop)) return EINA_FALSE;
-   if (!_db_fill_accessors(foo_id, kls, prop)) return EINA_FALSE;
+   if (!_db_fill_keys     (foo_id,      prop)) goto failure;
+   if (!_db_fill_values   (foo_id,      prop)) goto failure;
+   if (!_db_fill_accessors(foo_id, kls, prop)) goto failure;
 
    if (!prop->accessors)
      {
@@ -216,6 +216,10 @@ _db_fill_property(Eolian_Class *cl, Eo_Class_Def *kls, 
Eo_Property_Def *prop)
    database_class_function_add(cl, foo_id);
 
    return EINA_TRUE;
+
+failure:
+   database_function_del(foo_id);
+   return EINA_FALSE;
 }
 
 static Eina_Bool

-- 


Reply via email to