stefan pushed a commit to branch master.

commit 90aee3addd577461c3bf1b8d52fb816f80c6c45e
Author: Stefan Schmidt <[email protected]>
Date:   Thu Jun 13 14:28:07 2013 +0100

    edje-codegen: Now really fix the mem leak without running into a double 
free.
    
    The missing free was only for one of the paths to the end label. The other 
one
    freed it before already. Take this into account to avoid the double free.
---
 src/bin/edje/edje_codegen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_codegen.c b/src/bin/edje/edje_codegen.c
index 894a179..d03f450 100644
--- a/src/bin/edje/edje_codegen.c
+++ b/src/bin/edje/edje_codegen.c
@@ -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;

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to