forked from enlightenment/efl
Evas textblock: Fix memory leak
Summary: In evas_textblock_cursor_word_end function, the breaks' memory is allocated but not freed when cursor position is equal to text length. Fix: Remove memory allocating. @fix Reviewers: raster, tasn Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1225
This commit is contained in:
parent
0cc5f5c94d
commit
808202e6af
|
@ -7378,6 +7378,9 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
|
|||
|
||||
size_t len = eina_ustrbuf_length_get(cur->node->unicode);
|
||||
|
||||
if (cur->pos == len)
|
||||
return EINA_TRUE;
|
||||
|
||||
text = eina_ustrbuf_string_get(cur->node->unicode);
|
||||
|
||||
{
|
||||
|
@ -7386,9 +7389,6 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
|
|||
set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
|
||||
}
|
||||
|
||||
if (cur->pos == len)
|
||||
return EINA_TRUE;
|
||||
|
||||
for (i = cur->pos; text[i] && _is_white(text[i]) && (BREAK_AFTER(i)) ; i++);
|
||||
|
||||
for ( ; text[i] ; i++)
|
||||
|
|
Loading…
Reference in New Issue