raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=adbb8e6675a9e838019a8314d063c2d15879fdd6

commit adbb8e6675a9e838019a8314d063c2d15879fdd6
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Thu Feb 13 19:44:40 2014 +0900

    evas - table - fix theoretical leak that likely will never happen
    
    this addresses CID 1039663
---
 src/lib/evas/canvas/evas_object_table.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_table.c 
b/src/lib/evas/canvas/evas_object_table.c
index 07be0be..aef6b94 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -1169,6 +1169,7 @@ _pack(Eo *o, void *_pd, va_list *list)
    unsigned short rowspan = va_arg(*list, int);
    Eina_Bool *ret = va_arg(*list, Eina_Bool *);
    if (ret) *ret = EINA_FALSE;
+   Eina_Bool optalloc = EINA_FALSE;
 
    Evas_Object_Table_Option *opt;
 
@@ -1212,6 +1213,7 @@ _pack(Eo *o, void *_pd, va_list *list)
              ERR("could not allocate table option data.");
              return;
           }
+        optalloc = EINA_TRUE;
      }
 
    opt->obj = child;
@@ -1249,6 +1251,7 @@ _pack(Eo *o, void *_pd, va_list *list)
              priv->size.cols = max_col;
              priv->size.rows = max_row;
           }
+        if (optalloc) free(opt);
      }
    else
      {

-- 


Reply via email to