Skip to content

Commit 755f20c

Browse files
committed
Fix setGroups JNI array leak
1 parent b3243b7 commit 755f20c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

native/com_wolfssl_WolfSSLContext.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6679,6 +6679,9 @@ JNIEXPORT jint JNICALL Java_com_wolfssl_WolfSSLContext_setGroups
66796679

66806680
if (groupsSz == 0 || groupsSz > WOLFSSL_MAX_GROUP_COUNT ||
66816681
jniGroups == NULL) {
6682+
if (jniGroups != NULL) {
6683+
(*jenv)->ReleaseIntArrayElements(jenv, groups, jniGroups, JNI_ABORT);
6684+
}
66826685
return (jint)BAD_FUNC_ARG;
66836686
}
66846687

0 commit comments

Comments
 (0)