forked from enlightenment/efl
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
This commit is contained in:
parent
6dbdbee453
commit
aa5e2c6132
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue