diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-01 17:05:23 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-01 17:05:23 +0200 |
commit | d96219c185e68c82beb994db2c93bd26f47ce16a (patch) | |
tree | a8576ab9c9bf68c94536008df3b0256e56c0467e /ext/curl/multi.c | |
parent | f82414e935c18c1ff45ef1f006e24220631f5717 (diff) | |
download | php-git-d96219c185e68c82beb994db2c93bd26f47ce16a.tar.gz |
Fixed bug #80121
The issue affected both CurlHandle and CurlMultiHandle. I'll have
to double check this for other resource->object conversions as well.
Diffstat (limited to 'ext/curl/multi.c')
-rw-r--r-- | ext/curl/multi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 2c2e37e402..e717fd5d9e 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -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)) { |