cedric pushed a commit to branch master.

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

commit 7a35f5ffdb5ffaca0f372c3a2193578af5d7e1ba
Author: Rajeev Ranjan <rajee...@samsung.com>
Date:   Fri Jun 20 10:12:03 2014 +0200

    evas: fix invalid read reported in eina_rectangle_pool_free by valgrind.
    
    Summary:
    This fixes an invalid read reported by valgrind in eina_rectangle_pool_free
    Reference: T1360
    
    Signed-off-by: Sanjay Nirankari <sanjay...@partner.samsung.com>
    Signed-off-by: Rajeev Ranjan <rajee...@samsung.com>
    
    Reviewers: cedric, raster
    
    Reviewed By: cedric
    
    CC: sreedeep.m, sanjay, cedric
    
    Differential Revision: https://phab.enlightenment.org/D1069
    
    Signed-off-by: Cedric BAIL <c.b...@partner.samsung.com>
---
 src/lib/eina/eina_rectangle.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/lib/eina/eina_rectangle.c b/src/lib/eina/eina_rectangle.c
index 972755f..1386092 100644
--- a/src/lib/eina/eina_rectangle.c
+++ b/src/lib/eina/eina_rectangle.c
@@ -658,17 +658,13 @@ EAPI void
 eina_rectangle_pool_free(Eina_Rectangle_Pool *pool)
 {
    Eina_Rectangle_Alloc *del;
-   Eina_List *l;
    Eina_Rectangle *r;
 
    EINA_SAFETY_ON_NULL_RETURN(pool);
    DBG("pool=%p, size=(%d, %d), references=%u",
        pool, pool->w, pool->h, pool->references);
-   EINA_LIST_FOREACH(pool->empty, l, r)
-   {
-      eina_rectangle_free(r);
-      pool->empty = eina_list_remove_list(pool->empty, l);
-   }
+   EINA_LIST_FREE(pool->empty, r)
+     eina_rectangle_free(r);
    while (pool->head)
      {
         del = (Eina_Rectangle_Alloc *)pool->head;

-- 


Reply via email to