edje-codegen: Now really fix the mem leak without running into a double free.
[framework/uifw/edje.git] / src / bin / edje_codegen.c
index 2504b97..cd61ef0 100644 (file)
@@ -811,7 +811,11 @@ _parse_parts(Evas_Object *ed)
        if (type == EDJE_PART_TYPE_EXTERNAL)
          {
             ei = calloc(1, sizeof(Part_External_Info));
-            if (!ei) goto end;
+            if (!ei)
+               {
+                  free(apiname);
+                  goto end;
+               }
             ei->description = description;
             ei->source = edje_edit_part_source_get(ed, name);
             ei->apiname = apiname;