forked from enlightenment/efl
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:
parent
bd15029b32
commit
7f7ac6b852
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue