Skip to content

Commit c7b69a0

Browse files
optimize curl (#5948)
1 parent 9cc896f commit c7b69a0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

thirdparty/php/curl/interface.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,9 @@ PHP_FUNCTION(swoole_native_curl_unescape) {
30653065
Z_PARAM_STR(str)
30663066
ZEND_PARSE_PARAMETERS_END();
30673067

3068-
ch = Z_CURL_P(zid);
3068+
if ((ch = swoole_curl_get_handle(zid)) == NULL) {
3069+
RETURN_FALSE;
3070+
}
30693071

30703072
if (ZEND_SIZE_T_INT_OVFL(ZSTR_LEN(str))) {
30713073
RETURN_FALSE;

thirdparty/php84/curl/interface.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void swoole_native_curl_minit(int module_number) {
232232
if (!CRYPTO_get_id_callback()) {
233233
int i, c = CRYPTO_num_locks();
234234

235-
php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T));
235+
php_curl_openssl_tsl = (MUTEX_T *) malloc(c * sizeof(MUTEX_T));
236236
if (!php_curl_openssl_tsl) {
237237
return;
238238
}

0 commit comments

Comments
 (0)