summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-30 15:38:55 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-30 16:08:24 +0200
commitf3199ba04bcb6f7dffdeb8b79d22f819dfe0fcd7 (patch)
tree431095edf584d45e9da3059e41c4c08ef3a8236d
parent507061a145b8201f97e9ca8a269947174c3995ac (diff)
downloadefl-f3199ba04bcb6f7dffdeb8b79d22f819dfe0fcd7.tar.gz
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
-rw-r--r--src/bindings/cxx/eina_cxx/eina_iterator.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bindings/cxx/eina_cxx/eina_iterator.hh b/src/bindings/cxx/eina_cxx/eina_iterator.hh
index 6fd90958f2..1a8fedd73f 100644
--- a/src/bindings/cxx/eina_cxx/eina_iterator.hh
+++ b/src/bindings/cxx/eina_cxx/eina_iterator.hh
@@ -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;
}