stefan pushed a commit to branch master.

commit 0a20c045b2433853acb198a667cac33303a05df7
Author: Stefan Schmidt <[email protected]>
Date:   Tue May 28 13:38:01 2013 +0100

    evas/textgrid: Fix memory leak.
    
    Free allocated color before we return in the failure case.
---
 src/lib/evas/canvas/evas_object_textgrid.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_object_textgrid.c 
b/src/lib/evas/canvas/evas_object_textgrid.c
index a637290..dc6e6e7 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -1430,6 +1430,7 @@ _palette_set(Eo *eo_obj, void *_pd, va_list *list)
              if (!c)
                {
                   ERR("Evas can not allocate memory");
+                  free(color);
                   return;
                }
              eina_array_push(palette, c);

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may

Reply via email to