devilhorns pushed a commit to branch master.

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

commit aa5e2c6132d42120d82a69c16ee71e5e88ff91da
Author: MinJeong Kim <[email protected]>
Date:   Tue Jun 24 09:00:56 2014 -0400

    eina-tiler: Fix invalid read on eina tiler
    
    Summary:
    Fix invalid read on eina tiler reported by valgrind.
    This revision will prevent access to data that was gained from eina 
iterator, after free of eina_iterator.
    
    Test Plan:
    1. Build enlightenment on devs/devilhorns/e_comp_wl branch with efl 
applyied this patch.
    2. Run enlightenment with valgrind options.
    3. build enlightenment with this patch
    4. Run any wayland app on enlightenment
    5. There will be no more invalid read message by valgrind.
    
    Reviewers: cedric, devilhorns, raster, gwanglim, zmike
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1080
---
 src/lib/eina/eina_tiler.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c
index 60906e0..25ecee1 100644
--- a/src/lib/eina/eina_tiler.c
+++ b/src/lib/eina/eina_tiler.c
@@ -1380,11 +1380,12 @@ eina_tiler_union(Eina_Tiler *dst,
           }
         _splitter_rect_add(dst, &_rect);
      }
-   eina_iterator_free(itr);
 
    if (rect)
      dst->last.add = *rect;
 
+   eina_iterator_free(itr);
+
    return EINA_TRUE;
 }
 
@@ -1418,11 +1419,12 @@ eina_tiler_subtract(Eina_Tiler *dst,
           }
         _splitter_rect_del(dst, &_rect);
      }
-   eina_iterator_free(itr);
 
    if (rect)
      dst->last.del = *rect;
 
+   eina_iterator_free(itr);
+
    return EINA_TRUE;
 }
 

-- 


Reply via email to