[php-src] Issue #11979: Property attributes of internal classes are never freed.
| From: | ju1ius | Date: | Tue, 15 Aug 2023 13:54:21 +0000 |
| Subject: | [php-src] Issue #11979: Property attributes of internal classes are never freed. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245189@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11979
Author: ju1ius
### Description
In
[zend_opcode.c](https://github.com/php/php-src/blob/63a7f225ea638a18c875adcba067e29bf117dd08/Zend/zend_opcode.c#L454),
the
prop_info->attributes hashtable is not released for internal classes.
Here's an excerpt of the current code (comments added):
```c
ZEND_HASH_MAP_FOREACH_PTR(&ce->properties_info, prop_info) {
if (prop_info->ce == ce) {
zend_string_release(prop_info->name);
zend_type_release(prop_info->type, /* persistent */ 1);
// ----------
// Notice the missing if(prop_info->attributes) zend_hash_release(prop_info->attributes);
// ----------
free(prop_info);
}
} ZEND_HASH_FOREACH_END();
```
### PHP Version
PHP 8.3-dev
### Operating System
irrelevant