Merge pull request #11141 from philljj/ecc_mutex_ret

ecc: check return of wc_InitMutex ecc_oid_cache_lock.
This commit is contained in:
JacobBarthelmeh
2026-08-11 17:01:06 -06:00
committed by GitHub
+4 -1
View File
@@ -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