stefan pushed a commit to branch evas-1.7.

commit c8e5b6ac8b131211c93d6ecf80d6e680a431a736
Author: Stefan Schmidt <[email protected]>
Date:   Tue Jun 11 14:23:51 2013 +0100

    evas/textgrid: Fix memory leak.
    
    Backport of 0a20c045b2433853acb198a667cac33303a05df7
    
    Free allocated color before we return in the failure case.
---
 ChangeLog                             | 4 ++++
 NEWS                                  | 1 +
 src/lib/canvas/evas_object_textgrid.c | 1 +
 3 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c6b9d80..4639705 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1307,3 +1307,7 @@
 2013-06-04  Cedric Bail
 
        * Evas preloading: correctly detect if loader can do async preloading.
+
+2013-06-11  Stefan Schmidt
+
+       * Evas texgrid: Fix memory leak
diff --git a/NEWS b/NEWS
index 6bea2d6..a845ba3 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Changes since Evas 1.7.7:
 
 Fixes:
    * Correctly detect if a loader support asynchronous preloading.
+   * Fix memory leak in evas textgrid
 
 Evas 1.7.7
 
diff --git a/src/lib/canvas/evas_object_textgrid.c 
b/src/lib/canvas/evas_object_textgrid.c
index daf362a..33971d8 100644
--- a/src/lib/canvas/evas_object_textgrid.c
+++ b/src/lib/canvas/evas_object_textgrid.c
@@ -1327,6 +1327,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);

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to