summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-04-13 14:43:00 +0900
committerHermet Park <chuneon.park@samsung.com>2020-04-13 14:43:57 +0900
commitf9ae39ef52b33c1af2c81b864a1f77657fd8e6d9 (patch)
treec4cdbac564b90374586e5a81b64e7405df6381b2
parent720db8694ce26f5f29efe79a3e125ccb6fbc1b14 (diff)
evas text: fix memory leak.
Summary: free used memory properly. Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11691
-rw-r--r--src/lib/evas/canvas/evas_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index ebd66998b4..757f3e47cd 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -125,7 +125,9 @@ _markup_to_utf8(Eina_Content *from, const char *to_type)
125{ 125{
126 Eina_Slice slice = eina_content_data_get(from); 126 Eina_Slice slice = eina_content_data_get(from);
127 char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem); 127 char *utf8 = evas_textblock_text_markup_to_utf8(NULL, slice.mem);
128 return eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type); 128 Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(utf8), to_type);
129 free(utf8);
130 return ret;
129} 131}
130 132
131static Eina_Content* 133static Eina_Content*
@@ -133,7 +135,9 @@ _utf8_to_markup(Eina_Content *from, const char *to_type)
133{ 135{
134 Eina_Slice slice = eina_content_data_get(from); 136 Eina_Slice slice = eina_content_data_get(from);
135 char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem); 137 char *markup = evas_textblock_text_utf8_to_markup(NULL, slice.mem);
136 return eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type); 138 Eina_Content *ret = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(markup), to_type);
139 free(markup);
140 return ret;
137} 141}
138 142
139EAPI int 143EAPI int