Skip to content
Snippets Groups Projects
Commit 0aa72717 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Friendly cryptlib version check failure handling

<Deuce> Feel free to not lock the mutex and never free/NULLify that string.
<Deuce> Should be nicer for people with separate logs, and a few bytes never hurt anyone.
parent 208b7e79
No related branches found
No related tags found
No related merge requests found
......@@ -364,15 +364,11 @@ bool do_cryptInit(int (*lprintf)(int level, const char* fmt, ...))
return false;
}
if (!cryptlib_initialized) {
pthread_mutex_lock(&ssl_sess_list_mutex);
if (cryptfail) {
lprintf(LOG_ERR,"cryptInit() returned %d: %s", cryptInit_error, cryptfail);
free(cryptfail);
cryptfail = NULL;
}
else
lprintf(LOG_ERR,"cryptInit() returned %d", cryptInit_error);
pthread_mutex_unlock(&ssl_sess_list_mutex);
}
return cryptlib_initialized;
}
......
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