diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-01-18 18:55:04 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-01-18 18:55:04 +0100 |
commit | 2cff66c15577ec921bd217fbe99e6e53e29b0acb (patch) | |
tree | 1e133bbded94339c314e1a634e4067a860556a06 /src | |
parent | 78ce67f579730f68b264f99dcf84ff31c92a01f0 (diff) | |
download | libssh-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.c | 2 |
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){ |