Skip to content

Commit ade6512

Browse files
author
pajoye
committed
- Fix #55301 (curl part) check if malloc succeded
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@313826 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 1697949 commit ade6512

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
@@ -819,6 +819,9 @@ PHP_MINIT_FUNCTION(curl)
819819
int i, c = CRYPTO_num_locks();
820820

821821
php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T));
822+
if (!php_curl_openssl_tsl) {
823+
return FAILURE;
824+
}
822825

823826
for (i = 0; i < c; ++i) {
824827
php_curl_openssl_tsl[i] = tsrm_mutex_alloc();

0 commit comments

Comments
 (0)