mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03:00
threads: Use calloc() instead of malloc()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -156,7 +156,7 @@ static int libcrypto_thread_init(void){
|
|||||||
int i;
|
int i;
|
||||||
if(user_callbacks == &ssh_threads_noop)
|
if(user_callbacks == &ssh_threads_noop)
|
||||||
return SSH_OK;
|
return SSH_OK;
|
||||||
libcrypto_mutexes=malloc(sizeof(void *) * n);
|
libcrypto_mutexes = calloc(n, sizeof(void *));
|
||||||
if (libcrypto_mutexes == NULL)
|
if (libcrypto_mutexes == NULL)
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
for (i=0;i<n;++i){
|
for (i=0;i<n;++i){
|
||||||
|
|||||||
Reference in New Issue
Block a user