From 8f6415143cafec55e278ce6fc2442ed46e4e0dc0 Mon Sep 17 00:00:00 2001 From: Daniel Hirt Date: Tue, 30 May 2017 13:47:48 +0300 Subject: [PATCH] gfx_filter: null-out freed pointer --- src/lib/evas/canvas/evas_object_textblock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 4a7d5d2..4b814ce 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -987,6 +987,7 @@ _format_unref_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt) if (fmt->gfx_filter->dc) ENFN->context_free(ENC, fmt->gfx_filter->dc); free(fmt->gfx_filter); + fmt->gfx_filter = NULL; } if ((obj->layer) && (obj->layer->evas)) evas_font_free(obj->layer->evas->evas, fmt->font.font); @@ -1033,7 +1034,10 @@ _item_free(const Evas_Object *eo_obj, Evas_Object_Textblock_Line *ln, Evas_Objec } EINA_INLIST_REMOVE(o->gfx_filter.text_items, ti->gfx_filter); if (!ti->gfx_filter->ctx) - free(ti->gfx_filter); + { + free(ti->gfx_filter); + ti->gfx_filter = NULL; + } else ti->gfx_filter->ti = NULL; } -- 2.7.4