Edje entry: Make cursors to null after free

Summary:
Edje entry: Make cursors to null after free

To prevent any illegal access of cursors
can lead to crash

@fix

Test Plan: NA

Reviewers: tasn

Reviewed By: tasn

Subscribers: shilpasingh, cedric

Differential Revision: https://phab.enlightenment.org/D3093
This commit is contained in:
Subodh Kumar 2015-09-25 09:49:18 +01:00 committed by Tom Hacohen
parent 7413d7ca98
commit df190346a1
1 changed files with 2 additions and 2 deletions

View File

@ -1100,8 +1100,6 @@ _anchors_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED,
{
Anchor *an = en->anchors->data;
evas_textblock_cursor_free(an->start);
evas_textblock_cursor_free(an->end);
while (an->sel)
{
Sel *sel = an->sel->data;
@ -1111,6 +1109,8 @@ _anchors_clear(Evas_Textblock_Cursor *c EINA_UNUSED, Evas_Object *o EINA_UNUSED,
free(sel);
an->sel = eina_list_remove_list(an->sel, an->sel);
}
evas_textblock_cursor_free(an->start);
evas_textblock_cursor_free(an->end);
free(an->name);
free(an);
en->anchors = eina_list_remove_list(en->anchors, en->anchors);