From e1015d8726757580ae656c8b81831fa2bca0165b Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Tue, 11 Jun 2013 14:10:28 +0100 Subject: [PATCH] evas/textgrid: Backport memory leak. Backport of 0a20c045b2433853acb198a667cac33303a05df7 Free allocated color before we return in the failure case. Change-Id: Ibc75fcb72132fc7d9060389eae3e24b19a1a3ed6 --- ChangeLog | 4 ++++ NEWS | 4 ++++ src/lib/canvas/evas_object_textgrid.c | 1 + 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8c765a4..34c83d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1275,3 +1275,7 @@ 2013-04-10 Tom Hacohen (Tasn) Yakov Goldberg * Evas textblock : Added split cursor for BiDi text + +2013-06-11 Stefan Schmidt + + * Fix memory leak in error path of textgrid diff --git a/NEWS b/NEWS index 7224bfb..95edc54 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ Evas 1.8.0 +Changes since Evas 1.7.7 +------------------------- + Additions: * Add EVAS_GL_LINE_OFFSET_HACK_DISABLE to turn off line shift correction by evas. @@ -8,6 +11,7 @@ Fixes: * Fix the line drawing clipping problem on arm gl driver. * Evas: Fix Evas_Object_Text when LTR and RTL are used in the same paragraph. * Evas font: click on left/right half of char does matter now. + * Fix memory leak in textgrid Improvements: * Evas textblock : Added split cursor for BiDi text diff --git a/src/lib/canvas/evas_object_textgrid.c b/src/lib/canvas/evas_object_textgrid.c index b117f26..ffba710 100644 --- a/src/lib/canvas/evas_object_textgrid.c +++ b/src/lib/canvas/evas_object_textgrid.c @@ -1329,6 +1329,7 @@ evas_object_textgrid_palette_set(Evas_Object *obj, Evas_Textgrid_Palette pal, in if (!c) { ERR("Evas can not allocate memory"); + free(color); return; } eina_array_push(palette, c); -- 2.7.4