summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-03-08 19:56:29 +0000
committerFelipe Pena <felipe@php.net>2011-03-08 19:56:29 +0000
commit67fa13a3ca48efab3bcd536a78cc7e729ade35b2 (patch)
tree093fc8b94db997daa363c23e36207e345203a979
parent9c61d0a6dda699422c2c4ae4a76731f1c75d1859 (diff)
downloadphp-git-67fa13a3ca48efab3bcd536a78cc7e729ade35b2.tar.gz
- Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance segfaults)
-rwxr-xr-xext/spl/spl_directory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index d764c927c7..b1beae753d 100755
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1598,7 +1598,9 @@ static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC)
iterator->intern.data = NULL; /* mark as unused */
zval_ptr_dtor(&iterator->current);
- zval_ptr_dtor(&zfree);
+ if (zfree) {
+ zval_ptr_dtor(&zfree);
+ }
}
/* }}} */