summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-03-15 17:06:34 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-03-15 17:07:19 +0100
commit97f9fd6949a52d1eb30c3e1c90f0789b57c29468 (patch)
treef845eacd4f79cd11ab142ada801709d56114d0d7 /ext/curl
parente7d40afb7a7984174eb132a14b7a6621c8e76258 (diff)
downloadphp-git-97f9fd6949a52d1eb30c3e1c90f0789b57c29468.tar.gz
Don't immediately destroy curl pushfunction
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/multi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 073a6b3688..0d55e75657 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -425,6 +425,7 @@ void _php_curl_multi_close(zend_resource *rsrc) /* {{{ */
curl_multi_cleanup(mh->multi);
zend_llist_clean(&mh->easyh);
if (mh->handlers->server_push) {
+ zval_ptr_dtor(&mh->handlers->server_push->func_name);
efree(mh->handlers->server_push);
}
if (mh->handlers) {
@@ -587,11 +588,6 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
ZVAL_COPY(&mh->handlers->server_push->func_name, zvalue);
mh->handlers->server_push->method = PHP_CURL_USER;
- if (!Z_ISUNDEF(mh->handlers->server_push->func_name)) {
- zval_ptr_dtor(&mh->handlers->server_push->func_name);
- mh->handlers->server_push->fci_cache = empty_fcall_info_cache;
-
- }
error = curl_multi_setopt(mh->multi, option, _php_server_push_callback);
if (error != CURLM_OK) {
return 0;