mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 08:56:17 +08:00
修复JNI接口中SM4解密内存管理缺陷
This commit is contained in:
@@ -424,6 +424,7 @@ end:
|
||||
if (keybuf) (*env)->ReleaseByteArrayElements(env, key, (jbyte *)keybuf, JNI_ABORT);
|
||||
if (inbuf) (*env)->ReleaseByteArrayElements(env, in, (jbyte *)inbuf, JNI_ABORT);
|
||||
if (ivbuf) (*env)->ReleaseByteArrayElements(env, iv, (jbyte *)ivbuf, JNI_ABORT);
|
||||
OPENSSL_free(outbuf);
|
||||
EVP_CIPHER_CTX_free(cctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user