From 2bff3d1c2eb908f8ca62528e6343d7f0e8d4379a Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Wed, 19 Feb 2014 10:44:34 +0000 Subject: [PATCH] evas - Added eina_stringshare_ref call for fallbacks, lang in font description. Summary: When the fdesc(Font Description) is duplicated, ref of all of stringshare pointers should be increased. But, in the evas_font_desc_dup API, we only increased ref for name string. It can cause some of memory issues. Reviewers: tasn, woohyun, seoz, Hermet CC: cedric Differential Revision: https://phab.enlightenment.org/D570 --- src/lib/evas/canvas/evas_font_dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index 00a12495e1..a75cd945eb 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -444,6 +444,8 @@ evas_font_desc_dup(const Evas_Font_Description *fdesc) new->ref = 1; new->is_new = EINA_TRUE; new->name = eina_stringshare_ref(new->name); + new->fallbacks = eina_stringshare_ref(new->fallbacks); + new->lang = eina_stringshare_ref(new->lang); return new; }