edje_edit: Check return of _edje_edit_edje_file_save and close files if we fail
authorStefan Schmidt <s.schmidt@samsung.com>
Thu, 4 Sep 2014 09:26:26 +0000 (11:26 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Thu, 4 Sep 2014 09:28:33 +0000 (11:28 +0200)
We check the retrun of _edje_edit_edje_file_save everywhere else and should do
here as well.

CID 1224759

src/lib/edje/edje_edit.c

index cf83b62..1be60a1 100644 (file)
@@ -11219,7 +11219,12 @@ edje_edit_clean_save_as(Evas_Object *obj, const char* new_file_name)
      }
 
    /* copying file structure */
-   _edje_edit_edje_file_save(ef_out, ed->file);
+   if (!_edje_edit_edje_file_save(ef_out, ed->file))
+     {
+        eet_close(ef);
+        eet_close(ef_out);
+        return EINA_FALSE;
+     }
 
    int count = 0;
    char **ent = eet_list(ef, "*", &count);