summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-30 15:38:55 +0200
committerMike Blumenkrantz <zmike@samsung.com>2019-10-04 09:54:06 -0400
commite0341cd8f6f33de2123b23b54785df7dae6ea69d (patch)
tree6a32e02270597719708fc3c3528eeb22b03bf886
parenta20aea042832e7bfac84f0b525fd0b8c50373081 (diff)
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 6fd9095..1a8fedd 100644
--- a/src/bindings/cxx/eina_cxx/eina_iterator.hh
+++ b/src/bindings/cxx/eina_cxx/eina_iterator.hh
@@ -189,7 +189,10 @@ public:
189 void* data; 189 void* data;
190 Eina_Bool r = ::eina_iterator_next(this->_iterator, &data); 190 Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
191 if(!r) 191 if(!r)
192 this->_iterator = 0; 192 {
193 ::eina_iterator_free(this->_iterator);
194 this->_iterator = 0;
195 }
193 _value = static_cast<pointer>(data); 196 _value = static_cast<pointer>(data);
194 return *this; 197 return *this;
195 } 198 }
@@ -267,7 +270,10 @@ public:
267 void* data; 270 void* data;
268 Eina_Bool r = ::eina_iterator_next(this->_iterator, &data); 271 Eina_Bool r = ::eina_iterator_next(this->_iterator, &data);
269 if(!r) 272 if(!r)
270 this->_iterator = 0; 273 {
274 ::eina_iterator_free(this->_iterator);
275 this->_iterator = 0;
276 }
271 _value = static_cast<pointer>(data); 277 _value = static_cast<pointer>(data);
272 return *this; 278 return *this;
273 } 279 }