summaryrefslogtreecommitdiff
path: root/src/lib/emotion
diff options
context:
space:
mode:
authorWonguk Jeong <wonguk.jeong@samsung.com>2014-04-27 13:10:25 +0200
committerCedric Bail <cedric.bail@free.fr>2014-04-27 13:10:48 +0200
commit66b784c804412242785fcc0b29c1a1ad64808eb4 (patch)
tree0b0a6fecb7f3a34e4e71e530853eca1ab533056a /src/lib/emotion
parent335e8c0b9155e7b5f8adc880a0e454ea3ab825d7 (diff)
emotion: use eina stringshare not strdup
Summary: @fix Reviewers: raster, cedric Reviewed By: cedric CC: seoz, cedric Differential Revision: https://phab.enlightenment.org/D804
Diffstat (limited to 'src/lib/emotion')
-rw-r--r--src/lib/emotion/emotion_smart.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 7ec603b9c8..e60506b2e3 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -225,9 +225,9 @@ _smart_data_free(Smart_Data *sd)
225 sd->job = NULL; 225 sd->job = NULL;
226 if (sd->anim) ecore_animator_del(sd->anim); 226 if (sd->anim) ecore_animator_del(sd->anim);
227 sd->anim = NULL; 227 sd->anim = NULL;
228 free(sd->progress.info); 228 eina_stringshare_del(sd->progress.info);
229 sd->progress.info = NULL; 229 sd->progress.info = NULL;
230 free(sd->ref.file); 230 eina_stringshare_del(sd->ref.file);
231 sd->ref.file = NULL; 231 sd->ref.file = NULL;
232 free(sd); 232 free(sd);
233 233
@@ -341,12 +341,12 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
341 file = sd->file; 341 file = sd->file;
342 sd->file = NULL; 342 sd->file = NULL;
343 343
344 free(sd->title); 344 eina_stringshare_del(sd->title);
345 sd->title = NULL; 345 sd->title = NULL;
346 free(sd->progress.info); 346 eina_stringshare_del(sd->progress.info);
347 sd->progress.info = NULL; 347 sd->progress.info = NULL;
348 sd->progress.stat = 0.0; 348 sd->progress.stat = 0.0;
349 free(sd->ref.file); 349 eina_stringshare_del(sd->ref.file);
350 sd->ref.file = NULL; 350 sd->ref.file = NULL;
351 sd->ref.num = 0; 351 sd->ref.num = 0;
352 sd->spu.button_num = 0; 352 sd->spu.button_num = 0;
@@ -1565,8 +1565,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
1565 Smart_Data *sd; 1565 Smart_Data *sd;
1566 1566
1567 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1567 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1568 free(sd->title); 1568 eina_stringshare_replace(&sd->title, title);
1569 sd->title = strdup(title);
1570 evas_object_smart_callback_call(obj, SIG_TITLE_CHANGE, NULL); 1569 evas_object_smart_callback_call(obj, SIG_TITLE_CHANGE, NULL);
1571} 1570}
1572 1571
@@ -1576,8 +1575,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st)
1576 Smart_Data *sd; 1575 Smart_Data *sd;
1577 1576
1578 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1577 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1579 free(sd->progress.info); 1578 eina_stringshare_replace(&sd->progress.info, info);
1580 sd->progress.info = strdup(info);
1581 sd->progress.stat = st; 1579 sd->progress.stat = st;
1582 evas_object_smart_callback_call(obj, SIG_PROGRESS_CHANGE, NULL); 1580 evas_object_smart_callback_call(obj, SIG_PROGRESS_CHANGE, NULL);
1583} 1581}
@@ -1588,8 +1586,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
1588 Smart_Data *sd; 1586 Smart_Data *sd;
1589 1587
1590 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1588 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1591 free(sd->ref.file); 1589 eina_stringshare_replace(&sd->ref.file, file);
1592 sd->ref.file = strdup(file);
1593 sd->ref.num = num; 1590 sd->ref.num = num;
1594 evas_object_smart_callback_call(obj, SIG_REF_CHANGE, NULL); 1591 evas_object_smart_callback_call(obj, SIG_REF_CHANGE, NULL);
1595} 1592}
@@ -1866,9 +1863,9 @@ _smart_del(Evas_Object * obj)
1866 sd->job = NULL; 1863 sd->job = NULL;
1867 if (sd->anim) ecore_animator_del(sd->anim); 1864 if (sd->anim) ecore_animator_del(sd->anim);
1868 sd->anim = NULL; 1865 sd->anim = NULL;
1869 free(sd->progress.info); 1866 eina_stringshare_del(sd->progress.info);
1870 sd->progress.info = NULL; 1867 sd->progress.info = NULL;
1871 free(sd->ref.file); 1868 eina_stringshare_del(sd->ref.file);
1872 sd->ref.file = NULL; 1869 sd->ref.file = NULL;
1873 if (sd->smartobj) evas_object_smart_data_set(sd->smartobj, NULL); 1870 if (sd->smartobj) evas_object_smart_data_set(sd->smartobj, NULL);
1874 sd->smartobj = NULL; 1871 sd->smartobj = NULL;