1
0
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:
Andreas Schneider
2018-01-18 18:55:04 +01:00
parent 78ce67f579
commit 2cff66c155

View File

@@ -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){