From 142f9c517582b99659a18b6a50c0b044d19d6f92 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Mon, 19 Dec 2022 12:22:45 -0600 Subject: [PATCH] Call return after throw_exception --- bindings/java/c_kzg_4844_jni.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/java/c_kzg_4844_jni.c b/bindings/java/c_kzg_4844_jni.c index 0698974..74c249f 100644 --- a/bindings/java/c_kzg_4844_jni.c +++ b/bindings/java/c_kzg_4844_jni.c @@ -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);