forked from enlightenment/efl
evas text: fix memory leak.
Summary: free used memory properly. Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11691
This commit is contained in:
parent
720db8694c
commit
f9ae39ef52
|
@ -125,7 +125,9 @@ _markup_to_utf8(Eina_Content *from, const char *to_type)
|
|||
{
|
||||
Eina_Slice slice = eina_content_data_get(from);
|
||||
char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem);
|
||||
return eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type);
|
||||
Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type);
|
||||
free(utf8);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static Eina_Content*
|
||||
|
@ -133,7 +135,9 @@ _utf8_to_markup(Eina_Content *from, const char *to_type)
|
|||
{
|
||||
Eina_Slice slice = eina_content_data_get(from);
|
||||
char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem);
|
||||
return eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type);
|
||||
Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type);
|
||||
free(markup);
|
||||
return ret;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
|
|
Loading…
Reference in New Issue