summaryrefslogtreecommitdiff
path: root/Zend/zend_list.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2001-05-20 16:04:22 +0000
committerAndi Gutmans <andi@php.net>2001-05-20 16:04:22 +0000
commit65d9584ac023f7467281c663c1a0b22614ad1fd2 (patch)
tree3c2e50f4bb5a86633fba001a262f4fce57961b8f /Zend/zend_list.c
parent8d6d3006e10da30139bbaff635ae16296f7c6a34 (diff)
downloadphp-git-65d9584ac023f7467281c663c1a0b22614ad1fd2.tar.gz
- Don't allow resource types of 0
Diffstat (limited to 'Zend/zend_list.c')
-rw-r--r--Zend/zend_list.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index 9fa1ae199d..bfab8176d2 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -320,7 +320,12 @@ ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_fu
int zend_init_rsrc_list_dtors(void)
{
- return zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
+ int retval;
+
+ retval = zend_hash_init(&list_destructors, 50, NULL, NULL, 1);
+ list_destructors.nNextFreeElement=1; /* we don't want resource type 0 */
+
+ return retval;
}