Skip to content

Commit 42c4b86

Browse files
committed
- Fix #55301 (curl part) check if malloc succeded
1 parent 0e3ec21 commit 42c4b86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/curl/interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,9 @@ PHP_MINIT_FUNCTION(curl)
821821
int i, c = CRYPTO_num_locks();
822822

823823
php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T));
824+
if (!php_curl_openssl_tsl) {
825+
return FAILURE;
826+
}
824827

825828
for (i = 0; i < c; ++i) {
826829
php_curl_openssl_tsl[i] = tsrm_mutex_alloc();

0 commit comments

Comments
 (0)