1
1

threads: Use calloc() instead of malloc()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Andreas Schneider 2018-01-18 18:55:04 +01:00
родитель 78ce67f579
Коммит 2cff66c155

Просмотреть файл

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