Hello,

> Oh
> I forgot to mention that I instantiated those variables (it was like

obvious for me).
> Here is the initialization code:
>
> int Server::TLS_init()
> {
> int i;
>
> mutex_buf = (pthread_mutex_t*) malloc(CRYPTO_num_locks() *

sizeof(pthread_mutex_t));
> if (mutex_buf == NULL) {
> return -1;
> }
> for (i = 0; i < CRYPTO_num_locks(); i ) {
> pthread_mutex_init(&mutex_buf[i], NULL);
> }

Maybe changing "i" to "i++" may help.

> CRYPTO_set_locking_callback(locking_function);
> CRYPTO_set_id_callback(id_function);
>
> SSL_library_init();
> SSL_load_error_strings();
>
> return 0;
> }
>
> int Server::TLS_cleanup()
> {
> int i;
>
> if (mutex_buf == NULL) {
> return 0;
> }
>
> CRYPTO_set_locking_callback(NULL);
> CRYPTO_set_id_callback(NULL);
>
> for (i = 0; i < CRYPTO_num_locks(); i ) {
> pthread_mutex_destroy(&mutex_buf[i]);
> }

Maybe changing "i" to "i++" may help.

> free(mutex_buf);
> mutex_buf = NULL;
>
> return 0;
> }


Best regards,
--
Marek Marcola

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org