Skip to content

Commit 05a1557

Browse files
authored
ext/gmp: use zend_object_alloc instead to initialize GMP instances. (#17822)
1 parent ed9c283 commit 05a1557

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/gmp/gmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static void gmp_free_object_storage(zend_object *obj) /* {{{ */
208208

209209
static inline zend_object *gmp_create_object_ex(zend_class_entry *ce, mpz_ptr *gmpnum_target) /* {{{ */
210210
{
211-
gmp_object *intern = emalloc(sizeof(gmp_object) + zend_object_properties_size(ce));
211+
gmp_object *intern = zend_object_alloc(sizeof(gmp_object), ce);
212212

213213
zend_object_std_init(&intern->std, ce);
214214
object_properties_init(&intern->std, ce);

0 commit comments

Comments
 (0)