forked from enlightenment/efl
edje: edje_edit - fix posible resource leak
Fixes: https://phab.enlightenment.org/T1760 @fix
This commit is contained in:
parent
4d7c0fe3d9
commit
890ad5dd95
|
@ -1962,12 +1962,12 @@ edje_edit_group_limits_##TYPE##_list_get(Evas_Object * obj) \
|
||||||
\
|
\
|
||||||
if (!ed->file || !ed->collection) \
|
if (!ed->file || !ed->collection) \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
lim = calloc(ed->collection->limits.TYPE##_count, sizeof(Edje_Edit_Limit)); \
|
|
||||||
for(i = 0; i < ed->collection->limits.TYPE##_count; i++) \
|
for(i = 0; i < ed->collection->limits.TYPE##_count; i++) \
|
||||||
{ \
|
{ \
|
||||||
lim[i].name = eina_stringshare_add(ed->collection->limits.TYPE[i]->name); \
|
lim = malloc(sizeof(Edje_Edit_Limit)); \
|
||||||
lim[i].value = ed->collection->limits.TYPE[i]->value; \
|
lim->name = eina_stringshare_add(ed->collection->limits.TYPE[i]->name); \
|
||||||
limits = eina_list_append(limits, &lim[i]); \
|
lim->value = ed->collection->limits.TYPE[i]->value; \
|
||||||
|
limits = eina_list_append(limits, &lim); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
return limits; \
|
return limits; \
|
||||||
|
|
Loading…
Reference in New Issue