jaehyun pushed a commit to branch master.

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

commit bed6c84afb2694d3a1186c6878b9338503f55021
Author: JunsuChoi <jsuya.c...@samsung.com>
Date:   Tue Sep 20 23:34:17 2016 +0900

    edje_edit : add null check and close eet
    
    Signed-off-by: Jaehyun Cho <jae_hyun....@samsung.com>
---
 src/lib/edje/edje_edit.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index f3381fa..65e490c 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -1675,6 +1675,11 @@ edje_edit_group_copy(Evas_Object *obj, const char 
*group_name, const char *copy_
      }
    snprintf(buf, sizeof(buf), "edje/collections/%d", e->id);
    epc = eet_data_read(eetf, _edje_edd_edje_part_collection, buf);
+   if (!epc)
+     {
+        eet_close(eetf);
+        return EINA_FALSE;
+     }
 
    /* Search first free id */
    id = -1;
@@ -1703,7 +1708,11 @@ edje_edit_group_copy(Evas_Object *obj, const char 
*group_name, const char *copy_
 
    /* Create structs */
    de = _alloc(sizeof(Edje_Part_Collection_Directory_Entry));
-   if (!de) return EINA_FALSE;
+   if (!de)
+     {
+        eet_close(eetf);
+        return EINA_FALSE;
+     }
 
    /* Init Edje_Part_Collection_Directory_Entry */
    de->id = id;

-- 


Reply via email to