evas_object_textblock: fix to free style properly by edje's style_user_pop

Summary:
When calling style_user_pop in edje, current style was not freed by
style_user_pop in evas properly (since old_ts was not cared at all).

Because of this, memory was leaked by none accessible textblock styles which
should have been freed.

@fix

Test Plan:
1. call edje_object_part_text_style_user_pop
2. call edje_object_part_text_style_user_push with new style-text
3. repeat #1 and #2 several times and check the memory (ps -u)

Reviewers: ali.alzyod, bowonryu, bu5hm4n, zmike

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11801
This commit is contained in:
WooHyun Jung 2020-05-12 16:46:29 +09:00
parent 9d96583049
commit 8538130ba2
1 changed files with 1 additions and 0 deletions

View File

@ -8219,6 +8219,7 @@ _textblock_style_generic_set(Evas_Object *eo_obj, Evas_Textblock_Style *ts,
else if (us)
{
o->styles = eina_list_remove_list(o->styles, itr);
old_ts = us->st;
free(us);
}
}