File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ static zend_object *php_random_randomizer_new(zend_class_entry *ce)
235
235
static void randomizer_free_obj (zend_object * object ) {
236
236
php_random_randomizer * randomizer = php_random_randomizer_from_obj (object );
237
237
238
- if (randomizer -> is_userland_algo && randomizer -> status ) {
238
+ if (randomizer -> is_userland_algo ) {
239
239
php_random_status_free (randomizer -> status , false);
240
240
}
241
241
@@ -262,9 +262,10 @@ PHPAPI php_random_status *php_random_status_copy(const php_random_algo *algo, ph
262
262
263
263
PHPAPI void php_random_status_free (php_random_status * status , const bool persistent )
264
264
{
265
- if (status -> state ) {
265
+ if (status != NULL ) {
266
266
pefree (status -> state , persistent );
267
267
}
268
+
268
269
pefree (status , persistent );
269
270
}
270
271
@@ -286,10 +287,7 @@ PHPAPI void php_random_engine_common_free_object(zend_object *object)
286
287
{
287
288
php_random_engine * engine = php_random_engine_from_obj (object );
288
289
289
- if (engine -> status ) {
290
- php_random_status_free (engine -> status , false);
291
- }
292
-
290
+ php_random_status_free (engine -> status , false);
293
291
zend_object_std_dtor (object );
294
292
}
295
293
You can’t perform that action at this time.
0 commit comments