The issue affected both CurlHandle and CurlMultiHandle. I'll have
to double check this for other resource->object conversions as well.
This commit is contained in:
Nikita Popov 2020-10-01 17:05:23 +02:00
parent f82414e935
commit d96219c185
4 changed files with 45 additions and 5 deletions

View file

@ -537,6 +537,12 @@ void curl_multi_free_obj(zend_object *object)
php_curl *ch;
zval *pz_ch;
if (!mh->multi) {
/* Can happen if constructor throws. */
zend_object_std_dtor(&mh->std);
return;
}
for (pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch;
pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) {
if (!(OBJ_FLAGS(Z_OBJ_P(pz_ch)) & IS_OBJ_FREE_CALLED)) {