summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli <ali198724@gmail.com>2020-04-15 10:30:15 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-16 10:38:22 +0200
commit4ea455b1e52963bcb7c1c284e0358fbf8120fe25 (patch)
tree68e3ba16bc0f780c631a0bab7c7537c774286b48
parentc6df676a70b0e66f67d053982a46b030805b956b (diff)
evas_common_font: prevent leaking RGBA_Font
prevent leaking RGBA_Font in the for loop, CID: 1382852 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11709
-rw-r--r--src/lib/evas/canvas/evas_font_dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c
index 5b945dcb27..533993f94a 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -751,6 +751,13 @@ evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *
751 { 751 {
752 if (l == fonts || !font) /* First iteration OR no font */ 752 if (l == fonts || !font) /* First iteration OR no font */
753 { 753 {
754 /*This will suppress warnings for resource leak*/
755 if (font)
756 {
757 evas_common_font_free((RGBA_Font*)font);
758 font = NULL;
759 }
760
754 if (source) /* Load Font from "eet" source */ 761 if (source) /* Load Font from "eet" source */
755 { 762 {
756 Eet_File *ef; 763 Eet_File *ef;