mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Assert on unknown list entry type
This commit is contained in:
parent
3642592a12
commit
d085a7439f
1 changed files with 8 additions and 12 deletions
|
@ -66,12 +66,10 @@ static void zend_resource_dtor(zend_resource *res)
|
||||||
res->ptr = NULL;
|
res->ptr = NULL;
|
||||||
|
|
||||||
ld = zend_hash_index_find_ptr(&list_destructors, r.type);
|
ld = zend_hash_index_find_ptr(&list_destructors, r.type);
|
||||||
if (ld) {
|
ZEND_ASSERT(ld && "Unknown list entry type");
|
||||||
if (ld->list_dtor_ex) {
|
|
||||||
ld->list_dtor_ex(&r);
|
if (ld->list_dtor_ex) {
|
||||||
}
|
ld->list_dtor_ex(&r);
|
||||||
} else {
|
|
||||||
zend_error(E_WARNING, "Unknown list entry type (%d)", r.type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,12 +189,10 @@ void plist_entry_destructor(zval *zv)
|
||||||
zend_rsrc_list_dtors_entry *ld;
|
zend_rsrc_list_dtors_entry *ld;
|
||||||
|
|
||||||
ld = zend_hash_index_find_ptr(&list_destructors, res->type);
|
ld = zend_hash_index_find_ptr(&list_destructors, res->type);
|
||||||
if (ld) {
|
ZEND_ASSERT(ld && "Unknown list entry type");
|
||||||
if (ld->plist_dtor_ex) {
|
|
||||||
ld->plist_dtor_ex(res);
|
if (ld->plist_dtor_ex) {
|
||||||
}
|
ld->plist_dtor_ex(res);
|
||||||
} else {
|
|
||||||
zend_error(E_WARNING,"Unknown list entry type (%d)", res->type);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(res);
|
free(res);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue