Skip to content

Commit 97f9fd6

Browse files
committed
Don't immediately destroy curl pushfunction
1 parent e7d40af commit 97f9fd6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/curl/multi.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ void _php_curl_multi_close(zend_resource *rsrc) /* {{{ */
425425
curl_multi_cleanup(mh->multi);
426426
zend_llist_clean(&mh->easyh);
427427
if (mh->handlers->server_push) {
428+
zval_ptr_dtor(&mh->handlers->server_push->func_name);
428429
efree(mh->handlers->server_push);
429430
}
430431
if (mh->handlers) {
@@ -587,11 +588,6 @@ static int _php_curl_multi_setopt(php_curlm *mh, zend_long option, zval *zvalue,
587588

588589
ZVAL_COPY(&mh->handlers->server_push->func_name, zvalue);
589590
mh->handlers->server_push->method = PHP_CURL_USER;
590-
if (!Z_ISUNDEF(mh->handlers->server_push->func_name)) {
591-
zval_ptr_dtor(&mh->handlers->server_push->func_name);
592-
mh->handlers->server_push->fci_cache = empty_fcall_info_cache;
593-
594-
}
595591
error = curl_multi_setopt(mh->multi, option, _php_server_push_callback);
596592
if (error != CURLM_OK) {
597593
return 0;

0 commit comments

Comments
 (0)