File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -493,8 +493,9 @@ static inline int TPM2_WolfCrypt_Init(void)
493493 if (rc == 0 )
494494 rc = wc_SetSeed_Cb (wc_GenerateSeed );
495495 #endif
496- #ifndef WOLFSSL_MUTEX_INITIALIZER
497- wc_InitMutex (& gHwMutex );
496+ #if !defined(WOLFTPM_NO_LOCK ) && !defined(SINGLE_THREADED ) && \
497+ !defined(WOLFSSL_MUTEX_INITIALIZER )
498+ wc_InitMutex (& gHwLock );
498499 #endif
499500 }
500501 gWolfCryptRefCount ++ ;
@@ -693,8 +694,9 @@ TPM_RC TPM2_Cleanup(TPM2_CTX* ctx)
693694 if (gWolfCryptRefCount < 0 )
694695 gWolfCryptRefCount = 0 ;
695696 if (gWolfCryptRefCount == 0 ) {
696- #ifndef WOLFSSL_MUTEX_INITIALIZER
697- wc_FreeMutex (& gHwMutex );
697+ #if !defined(WOLFTPM_NO_LOCK ) && !defined(SINGLE_THREADED ) && \
698+ !defined(WOLFSSL_MUTEX_INITIALIZER )
699+ wc_FreeMutex (& gHwLock );
698700 #endif
699701 wolfCrypt_Cleanup ();
700702 }
You can’t perform that action at this time.
0 commit comments