Browse Source

initialize bucket #0 with nulls (normally it shouldn't be used at all, but if it is - we don't want any memory issues, do we?)

PHP-5.1
Antony Dovgal 20 years ago
parent
commit
1fa58ec003
  1. 1
      Zend/zend_objects_API.c

1
Zend/zend_objects_API.c

@ -33,6 +33,7 @@ ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint ini
objects->top = 1; /* Skip 0 so that handles are true */
objects->size = init_size;
objects->free_list_head = -1;
memset(&objects->object_buckets[0], 0, sizeof(zend_object_store_bucket));
}
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)

Loading…
Cancel
Save