1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/spl: use zend_object_alloc to create SplObjectStorage instances. (#17824)

This commit is contained in:
David CARLIER
2025-02-15 22:33:44 +00:00
committed by GitHub
parent 05a155782b
commit dbea8d3385

View File

@@ -257,8 +257,7 @@ static zend_object *spl_object_storage_new_ex(zend_class_entry *class_type, zend
spl_SplObjectStorage *intern;
zend_class_entry *parent = class_type;
intern = emalloc(sizeof(spl_SplObjectStorage) + zend_object_properties_size(parent));
memset(intern, 0, sizeof(spl_SplObjectStorage) - sizeof(zval));
intern = zend_object_alloc(sizeof(spl_SplObjectStorage), parent);
intern->pos = 0;
zend_object_std_init(&intern->std, class_type);