com php-src: Free memory if destructor wasn't called: ext/spl/spl_iterators.c

From: Date: Tue, 10 Mar 2015 21:57:28 +0000
Subject: com php-src: Free memory if destructor wasn't called: ext/spl/spl_iterators.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85451@lists.php.net to get a copy of this message
Commit: 48deb1cd9427c725790b074e05ccf1c9962e9dc9 Author: Dmitry Stogov <dmitry@zend.com> Wed, 11 Mar 2015 00:57:28 +0300 Parents: 816b1969732af6db3d2be3edab7938c299ea6535 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=48deb1cd9427c725790b074e05ccf1c9962e9dc9 Log: Free memory if destructor wasn't called Changed paths: M ext/spl/spl_iterators.c Diff: diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 21b3c8c..f0ce313 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -931,6 +931,11 @@ static void spl_RecursiveIteratorIterator_free_storage(zend_object *_object) { spl_recursive_it_object *object = spl_recursive_it_from_obj(_object); + if (object->iterators) { + efree(object->iterators); + object->iterators = NULL; + } + zend_object_std_dtor(&object->std); smart_str_free(&object->prefix[0]); smart_str_free(&object->prefix[1]);

« previous php.cvs (#85451) next »