fix decimal context leak
authorMichael Wallner <mike@php.net>
Fri, 10 Dec 2021 22:01:45 +0000 (23:01 +0100)
committerMichael Wallner <mike@php.net>
Tue, 14 Dec 2021 11:54:08 +0000 (12:54 +0100)
ion_private.h

index 367f6bf65f267aa68516d5ba67cbe9ed66fbad0a..e34a78e0e03d85a031e91255eaae1985f5918421 100644 (file)
@@ -448,6 +448,7 @@ static inline void php_ion_decimal_ctor(php_ion_decimal *obj)
                object_init_ex(&zdc, ce_Decimal_Context);
                obj->ctx = Z_OBJ(zdc);
                php_ion_decimal_ctx_ctor(php_ion_obj(decimal_ctx, obj->ctx));
+               GC_DELREF(obj->ctx);
        }
        update_property_obj(&obj->std, ZEND_STRL("context"), obj->ctx);