From 97f9fd6949a52d1eb30c3e1c90f0789b57c29468 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 15 Mar 2019 17:06:34 +0100 Subject: [PATCH] Don't immediately destroy curl pushfunction --- ext/curl/multi.c | 6 +----- 1 file changed, 1 insertion(+), 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; -- 2.40.0