efl: and fix a potential memory leak.
authorCedric BAIL <cedric.bail@free.fr>
Mon, 31 Dec 2012 01:59:00 +0000 (01:59 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Mon, 31 Dec 2012 01:59:00 +0000 (01:59 +0000)
SVN revision: 81922

src/lib/evas/canvas/evas_object_text.c

index 61a8649..62b0db7 100644 (file)
@@ -973,6 +973,8 @@ _text_text_set(Eo *eo_obj, void *_pd, va_list *list)
    eina_stringshare_replace(&o->cur.utf8_text, _text);
    o->prev.utf8_text = NULL;
 
+   if (o->cur.text != text) free(text);
+
    o->changed = 1;
    evas_object_change(eo_obj, obj);
    evas_object_clip_dirty(eo_obj, obj);