</stability>
<license>BSD, revised</license>
<notes><![CDATA[
-* Fix httpVersion retrieval on bigendian (Remi)
-* Fix etag/crc32b on bigendian (Remi)
+* Fixed bug #68009 (Segmentation fault after calling exit(0) after a request)
]]></notes>
<contents>
<dir name="/">
return SUCCESS;
}
-static void php_http_client_curl_handler_dtor(php_http_client_curl_handler_t *handler)
+static void php_http_client_curl_handler_clear(php_http_client_curl_handler_t *handler)
{
- TSRMLS_FETCH_FROM_CTX(handler->client->ts);
-
curl_easy_setopt(handler->handle, CURLOPT_NOPROGRESS, 1L);
#if PHP_HTTP_CURL_VERSION(7,32,0)
curl_easy_setopt(handler->handle, CURLOPT_XFERINFOFUNCTION, NULL);
#endif
curl_easy_setopt(handler->handle, CURLOPT_VERBOSE, 0L);
curl_easy_setopt(handler->handle, CURLOPT_DEBUGFUNCTION, NULL);
+}
+
+static void php_http_client_curl_handler_dtor(php_http_client_curl_handler_t *handler)
+{
+ TSRMLS_FETCH_FROM_CTX(handler->client->ts);
+
+ php_http_client_curl_handler_clear(handler);
php_resource_factory_handle_dtor(handler->rf, handler->handle TSRMLS_CC);
php_resource_factory_free(&handler->rf);
php_http_client_curl_handler_t *handler = enqueue->opaque;
TSRMLS_FETCH_FROM_CTX(h->ts);
+ php_http_client_curl_handler_clear(handler);
if (CURLM_OK == (rs = curl_multi_remove_handle(curl->handle, handler->handle))) {
zend_llist_del_element(&h->requests, handler->handle, (int (*)(void *, void *)) compare_queue);
return SUCCESS;