fix c+p error: don't clobber the decryption object on error

This commit is contained in:
Hubert Chathi 2018-10-17 22:25:10 -04:00
parent 09dc3b6025
commit 6e6facba3b

View file

@ -414,12 +414,6 @@ JNIEXPORT jbyteArray OLM_PK_DECRYPTION_FUNC_DEF(generateKeyJni)(JNIEnv *env, job
if (errorMessage)
{
// release the allocated data
if (decryptionPtr)
{
olm_clear_pk_decryption(decryptionPtr);
free(decryptionPtr);
}
env->ThrowNew(env->FindClass("java/lang/Exception"), errorMessage);
}