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.n1@partner.samsung.com> Signed-off-by: Rajeev Ranjan <rajeev.r@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.bail@partner.samsung.com>
This commit is contained in:
parent
301b672b3a
commit
7a35f5ffdb
|
@ -658,17 +658,13 @@ EAPI void
|
||||||
eina_rectangle_pool_free(Eina_Rectangle_Pool *pool)
|
eina_rectangle_pool_free(Eina_Rectangle_Pool *pool)
|
||||||
{
|
{
|
||||||
Eina_Rectangle_Alloc *del;
|
Eina_Rectangle_Alloc *del;
|
||||||
Eina_List *l;
|
|
||||||
Eina_Rectangle *r;
|
Eina_Rectangle *r;
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN(pool);
|
EINA_SAFETY_ON_NULL_RETURN(pool);
|
||||||
DBG("pool=%p, size=(%d, %d), references=%u",
|
DBG("pool=%p, size=(%d, %d), references=%u",
|
||||||
pool, pool->w, pool->h, pool->references);
|
pool, pool->w, pool->h, pool->references);
|
||||||
EINA_LIST_FOREACH(pool->empty, l, r)
|
EINA_LIST_FREE(pool->empty, r)
|
||||||
{
|
|
||||||
eina_rectangle_free(r);
|
eina_rectangle_free(r);
|
||||||
pool->empty = eina_list_remove_list(pool->empty, l);
|
|
||||||
}
|
|
||||||
while (pool->head)
|
while (pool->head)
|
||||||
{
|
{
|
||||||
del = (Eina_Rectangle_Alloc *)pool->head;
|
del = (Eina_Rectangle_Alloc *)pool->head;
|
||||||
|
|
Loading…
Reference in New Issue