From 2cff66c15577ec921bd217fbe99e6e53e29b0acb Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 18 Jan 2018 18:55:04 +0100 Subject: threads: Use calloc() instead of malloc() Signed-off-by: Andreas Schneider --- src/threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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