File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 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)
235235static void randomizer_free_obj (zend_object * object ) {
236236 php_random_randomizer * randomizer = php_random_randomizer_from_obj (object );
237237
238- if (randomizer -> is_userland_algo && randomizer -> status ) {
238+ if (randomizer -> is_userland_algo ) {
239239 php_random_status_free (randomizer -> status , false);
240240 }
241241
@@ -262,9 +262,10 @@ PHPAPI php_random_status *php_random_status_copy(const php_random_algo *algo, ph
262262
263263PHPAPI void php_random_status_free (php_random_status * status , const bool persistent )
264264{
265- if (status -> state ) {
265+ if (status != NULL ) {
266266 pefree (status -> state , persistent );
267267 }
268+
268269 pefree (status , persistent );
269270}
270271
@@ -286,10 +287,7 @@ PHPAPI void php_random_engine_common_free_object(zend_object *object)
286287{
287288 php_random_engine * engine = php_random_engine_from_obj (object );
288289
289- if (engine -> status ) {
290- php_random_status_free (engine -> status , false);
291- }
292-
290+ php_random_status_free (engine -> status , false);
293291 zend_object_std_dtor (object );
294292}
295293
You can’t perform that action at this time.
0 commit comments