Avoid double release of crypto_lock_
[ Merge of http://go/wvgerrit/65162 ] Bug: 118645525 Test: WV unit/integration tests Change-Id: Ia8c8e156cf5a5a795d2a502dcb021936b99d0367
This commit is contained in:
@@ -833,6 +833,8 @@ CdmResponseType CryptoSession::LoadKeys(
|
||||
const std::vector<CryptoKey>& keys,
|
||||
const std::string& provider_session_token,
|
||||
const std::string& srm_requirement, CdmLicenseKeyType key_type) {
|
||||
CdmResponseType result = KEY_ADDED;
|
||||
{
|
||||
LOGV("CryptoSession::LoadKeys: Lock");
|
||||
AutoLock auto_lock(crypto_lock_);
|
||||
|
||||
@@ -846,7 +848,6 @@ CdmResponseType CryptoSession::LoadKeys(
|
||||
message, signature, mac_key_iv, mac_key, keys, provider_session_token,
|
||||
&cipher_mode_, srm_requirement);
|
||||
|
||||
CdmResponseType result = KEY_ADDED;
|
||||
if (OEMCrypto_SUCCESS == sts) {
|
||||
if (!provider_session_token.empty())
|
||||
update_usage_table_after_close_session_ = true;
|
||||
@@ -862,9 +863,7 @@ CdmResponseType CryptoSession::LoadKeys(
|
||||
LOGE("CryptoSession::LoadKeys: OEMCrypto_LoadKeys error=%d", sts);
|
||||
result = LOAD_KEY_ERROR;
|
||||
}
|
||||
|
||||
// Leaving critical section
|
||||
crypto_lock_.Release();
|
||||
} // Release crypto_lock_
|
||||
|
||||
if (!provider_session_token.empty() &&
|
||||
usage_support_type_ == kUsageTableSupport) {
|
||||
|
||||
Reference in New Issue
Block a user