mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-13 12:21:27 +02:00
Merge pull request #11141 from philljj/ecc_mutex_ret
ecc: check return of wc_InitMutex ecc_oid_cache_lock.
This commit is contained in:
+4
-1
@@ -16939,7 +16939,10 @@ int wc_ecc_get_oid(word32 oidSum, const byte** oid, word32* oidSz)
|
||||
#ifndef WOLFSSL_MUTEX_INITIALIZER
|
||||
/* extra sanity check if wolfCrypt_Init not called */
|
||||
if (eccOidLockInit == 0) {
|
||||
wc_InitMutex(&ecc_oid_cache_lock);
|
||||
ret = wc_InitMutex(&ecc_oid_cache_lock);
|
||||
if (ret != 0) {
|
||||
return BAD_MUTEX_E;
|
||||
}
|
||||
eccOidLockInit = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user