edje example - dont leak text
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 16 Jul 2020 20:00:36 +0000 (21:00 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 16 Jul 2020 22:24:00 +0000 (07:24 +0900)
src/examples/edje/edje-text.c

index 45fb340..6a58d87 100644 (file)
@@ -44,7 +44,9 @@ _on_delete(Ecore_Evas *ee EINA_UNUSED)
 static void
 _on_text_change(void *data EINA_UNUSED, Evas_Object *obj, const char *part)
 {
-   printf("text: %s\n", edje_object_part_text_unescaped_get(obj, part));
+   char *str = edje_object_part_text_unescaped_get(obj, part);
+   printf("text: %s\n", str);
+   free(str);
 }
 
 static void