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.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3032
This commit is contained in:
Srivardhan Hebbar 2015-09-08 10:23:42 +02:00 committed by Stefan Schmidt
parent 336c874fdc
commit 232352cb32
1 changed files with 0 additions and 4 deletions

View File

@ -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));