mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +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;
|
||||
if(user_callbacks == &ssh_threads_noop)
|
||||
return SSH_OK;
|
||||
libcrypto_mutexes=malloc(sizeof(void *) * n);
|
||||
libcrypto_mutexes = calloc(n, sizeof(void *));
|
||||
if (libcrypto_mutexes == NULL)
|
||||
return SSH_ERROR;
|
||||
for (i=0;i<n;++i){
|
||||
|
||||
Reference in New Issue
Block a user