eolian-cxx: Release iterators

Summary:
When the iterators advanced, the CXX wrappers null'd them but did not
call eina_value_free.

ref T8280

Reviewers: q66, brunobelo, felipealmeida

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8280

Differential Revision: https://phab.enlightenment.org/D10238
This commit is contained in:
Lauro Moura 2019-09-30 15:38:55 +02:00 committed by Daniel Kolesa
parent 507061a145
commit f3199ba04b
1 changed files with 8 additions and 2 deletions

View File

@ -189,7 +189,10 @@ public:
void* data;
Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
if(!r)
this->_iterator = 0;
{
::eina_iterator_free(this->_iterator);
this->_iterator = 0;
}
_value = static_cast<pointer>(data);
return *this;
}
@ -267,7 +270,10 @@ public:
void* data;
Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
if(!r)
this->_iterator = 0;
{
::eina_iterator_free(this->_iterator);
this->_iterator = 0;
}
_value = static_cast<pointer>(data);
return *this;
}