stefan pushed a commit to branch master.

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

commit 7f7ac6b85209e0bc1040ea801868c79b6a96a55e
Author: Srivardhan Hebbar <sri.heb...@samsung.com>
Date:   Tue Sep 8 10:23:42 2015 +0200

    eet_example: Fixing memory leak.
    
    Summary:
    calloc is done 2times, so there is a memory leak. So fixing that.
    
    Signed-off-by: Srivardhan Hebbar <sri.heb...@samsung.com>
    
    Reviewers: cedric, stefan_schmidt
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D3032
---
 src/examples/eet/eet-data-file_descriptor_02.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/examples/eet/eet-data-file_descriptor_02.c 
b/src/examples/eet/eet-data-file_descriptor_02.c
index cba0377..e0ca00d 100644
--- a/src/examples/eet/eet-data-file_descriptor_02.c
+++ b/src/examples/eet/eet-data-file_descriptor_02.c
@@ -462,7 +462,6 @@ _variant_1_new(const char *v1,
         return NULL;
      }
 
-   va = calloc(1, sizeof (Example_Variant));
    va->t.type = eet_mapping[0].name;
    st1 = calloc(1, sizeof (Example_Struct1));
    _st1_set(st1, atof(v1), atoi(v2), eina_stringshare_add(v3));
@@ -486,8 +485,6 @@ _variant_2_new(const char *v1,
         return NULL;
      }
 
-   va = calloc(1, sizeof (Example_Variant));
-
    va->t.type = eet_mapping[1].name;
 
    printf("type gets %s\n", va->t.type);
@@ -511,7 +508,6 @@ _variant_3_new(const char *v1)
         return NULL;
      }
 
-   va = calloc(1, sizeof (Example_Variant));
    va->t.type = eet_mapping[2].name;
    st3 = calloc(1, sizeof (Example_Struct3));
    _st3_set(st3, atoi(v1));

-- 


Reply via email to