evas_common_font: release reallocated glyphs bitmaps data
authorAli Alzyod <ali198724@gmail.com>
Tue, 9 Jun 2020 01:25:10 +0000 (10:25 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 9 Jun 2020 21:19:07 +0000 (06:19 +0900)
Reviewers: woohyun, smohanty

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8743

Differential Revision: https://phab.enlightenment.org/D11945

src/lib/evas/common/evas_font_main.c

index c0d2171..f670669 100644 (file)
@@ -644,6 +644,11 @@ _glyph_free(RGBA_Font_Glyph *fg)
 
         if ((fg->glyph_out->rle) && (fg->glyph_out->bitmap.rle_alloc))
           free(fg->glyph_out->rle);
+        else if ((fg->glyph_out->bitmap.buffer) && (fg->glyph_out->bitmap.rle_alloc))
+          {
+             free(fg->glyph_out->bitmap.buffer);
+             fg->glyph_out->bitmap.buffer = NULL;
+          }
         fg->glyph_out->rle = NULL;
         if (!fg->glyph_out->bitmap.no_free_glout) free(fg->glyph_out);
         fg->glyph_out = NULL;