Call return after throw_exception

This commit is contained in:
Justin Traglia 2022-12-19 12:22:45 -06:00
parent 26c57c4444
commit 142f9c5175
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ JNIEXPORT void JNICALL Java_ethereum_ckzg4844_CKZG4844JNI_loadTrustedSetup__Ljav
if (settings == NULL)
{
throw_exception(env, "Failed to allocate memory for settings.");
return;
}
const char *file_native = (*env)->GetStringUTFChars(env, file, 0);
@ -88,6 +89,7 @@ JNIEXPORT void JNICALL Java_ethereum_ckzg4844_CKZG4844JNI_loadTrustedSetup___3BJ
if (settings == NULL)
{
throw_exception(env, "Failed to allocate memory for settings.");
return;
}
jbyte *g1_native = (*env)->GetByteArrayElements(env, g1, NULL);