mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 13:14:45 +02:00
add sanity check on cleanup for possible no init
This commit is contained in:
@@ -3127,6 +3127,9 @@ int CyaSSL_Cleanup(void)
|
|||||||
|
|
||||||
CYASSL_ENTER("CyaSSL_Cleanup");
|
CYASSL_ENTER("CyaSSL_Cleanup");
|
||||||
|
|
||||||
|
if (initRefCount == 0)
|
||||||
|
return 0; /* possibly no init yet */
|
||||||
|
|
||||||
if (LockMutex(&count_mutex) != 0) {
|
if (LockMutex(&count_mutex) != 0) {
|
||||||
CYASSL_MSG("Bad Lock Mutex count");
|
CYASSL_MSG("Bad Lock Mutex count");
|
||||||
return BAD_MUTEX_ERROR;
|
return BAD_MUTEX_ERROR;
|
||||||
|
Reference in New Issue
Block a user