- SSLCritters = malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t *));
- if (!SSLCritters) {
- syslog(LOG_ERR, "crypto: can't allocate memory!");
- exit(CTDLEXIT_CRYPTO);
- }
- else {
- int a;
-
- for (a = 0; a < CRYPTO_num_locks(); a++) {
- SSLCritters[a] = malloc(sizeof(pthread_mutex_t));
- if (!SSLCritters[a]) {
- syslog(LOG_ERR, "crypto: can't allocate memory!!");
- exit(CTDLEXIT_CRYPTO);
- }
- pthread_mutex_init(SSLCritters[a], NULL);
- }
- }
-