From d6decddafb89fe55122e5528e82c5e7d6f8e85fd Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 18 Feb 2021 09:43:02 -0800 Subject: [PATCH] PR Feedback. --- .../pal_evp_cipher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/pal_evp_cipher.c b/src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/pal_evp_cipher.c index a240d5c361000..9551335f9ec90 100644 --- a/src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/pal_evp_cipher.c +++ b/src/libraries/Native/Unix/System.Security.Cryptography.Native.Android/pal_evp_cipher.c @@ -371,7 +371,8 @@ int32_t CryptoNative_EvpCipherSetGcmTag(CipherCtx* ctx, uint8_t* tag, int32_t ta (*env)->SetByteArrayRegion(env, inDataBytes, 0, tagLength, (jbyte*)tag); jbyteArray outDataBytes = (jbyteArray)(*env)->CallObjectMethod(env, ctx->cipher, g_cipherUpdateMethod, inDataBytes); (*env)->DeleteLocalRef(env, outDataBytes); - return SUCCESS; + (*env)->DeleteLocalRef(env, inDataBytes); + return CheckJNIExceptions(env) ? FAIL : SUCCESS; } int32_t CryptoNative_EvpCipherSetCcmTag(CipherCtx* ctx, uint8_t* tag, int32_t tagLength)