aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-01-18 18:55:04 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-01-18 18:55:04 +0100
commit2cff66c15577ec921bd217fbe99e6e53e29b0acb (patch)
tree1e133bbded94339c314e1a634e4067a860556a06 /src
parent78ce67f579730f68b264f99dcf84ff31c92a01f0 (diff)
downloadlibssh-2cff66c15577ec921bd217fbe99e6e53e29b0acb.tar.gz
libssh-2cff66c15577ec921bd217fbe99e6e53e29b0acb.tar.xz
libssh-2cff66c15577ec921bd217fbe99e6e53e29b0acb.zip
threads: Use calloc() instead of malloc()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threads.c b/src/threads.c
index b85ac756..191b3b64 100644
--- a/src/threads.c
+++ b/src/threads.c
@@ -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){