Skip to content
Snippets Groups Projects
Commit 93dd09c4 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

You can't just screw around with a pair of shared linked lists

without locking!  That's chaos!
parent 05beb050
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -558,6 +558,7 @@ int destroy_session(int (*lprintf)(int level, const char* fmt, ...), CRYPT_SESSI
struct cert_list *psess = NULL;
int ret = CRYPT_ERROR_NOTFOUND;
pthread_mutex_lock(&ssl_cert_list_mutex);
sess = sess_list;
while (sess != NULL) {
if (sess->sess == csess) {
......@@ -587,6 +588,7 @@ int destroy_session(int (*lprintf)(int level, const char* fmt, ...), CRYPT_SESSI
psess = sess;
sess = sess->next;
}
pthread_mutex_unlock(&ssl_cert_list_mutex);
if (ret == CRYPT_ERROR_NOTFOUND)
ret = cryptDestroySession(csess);
return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment