LibVNCClient: properly free the openssl session stuff on shutdown.

pull/1/head
Christian Beier 13 years ago
parent 77286f0831
commit f606179c9c

@ -568,9 +568,7 @@ void FreeTLS(rfbClient* client)
{ {
int i; int i;
if (mutex_buf == NULL) if (mutex_buf != NULL) {
return (0);
CRYPTO_set_dynlock_create_callback(NULL); CRYPTO_set_dynlock_create_callback(NULL);
CRYPTO_set_dynlock_lock_callback(NULL); CRYPTO_set_dynlock_lock_callback(NULL);
CRYPTO_set_dynlock_destroy_callback(NULL); CRYPTO_set_dynlock_destroy_callback(NULL);
@ -582,5 +580,8 @@ void FreeTLS(rfbClient* client)
pthread_mutex_destroy(&mutex_buf[i]); pthread_mutex_destroy(&mutex_buf[i]);
free(mutex_buf); free(mutex_buf);
mutex_buf = NULL; mutex_buf = NULL;
}
SSL_free(client->tlsSession);
} }

Loading…
Cancel
Save