Call zpp_none in PharFileInfo::__destruct()

Using __destruct() with internal classes is dubious, but not so
simple to avoid here because the code extends SPL classes.
This commit is contained in:
Nikita Popov 2020-07-20 16:39:43 +02:00
parent 50de334d26
commit 2160f5ce59

View file

@ -4456,6 +4456,10 @@ PHP_METHOD(PharFileInfo, __destruct)
zval *zobj = ZEND_THIS;
phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset);
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
if (entry_obj->entry && entry_obj->entry->is_temp_dir) {
if (entry_obj->entry->filename) {
efree(entry_obj->entry->filename);