diff options
author | MinJeong Kim <minjjj.kim@samsung.com> | 2014-06-24 09:00:56 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-06-24 09:00:56 -0400 |
commit | aa5e2c6132d42120d82a69c16ee71e5e88ff91da (patch) | |
tree | cae63b7de7818255eacb8f0e5f5bd421573f4972 | |
parent | 6dbdbee45391356d98fdb0979355630be5dab615 (diff) | |
download | efl-aa5e2c6132d42120d82a69c16ee71e5e88ff91da.tar.gz |
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
-rw-r--r-- | src/lib/eina/eina_tiler.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index 60906e0fd9..25ecee158d 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; } |