summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/java/mupdf_native.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c
index 561ba1dc..ccc50fad 100644
--- a/platform/java/mupdf_native.c
+++ b/platform/java/mupdf_native.c
@@ -8547,7 +8547,12 @@ FUN(PDFAnnotation_setInkList)(JNIEnv *env, jobject self, jobject jinklist)
counts[i] = (*env)->GetArrayLength(env, jpath) / 2;
(*env)->GetFloatArrayRegion(env, jpath, k, counts[i], points);
- if ((*env)->ExceptionCheck(env)) return;
+ if ((*env)->ExceptionCheck(env))
+ {
+ fz_free(ctx, counts);
+ fz_free(ctx, points);
+ return;
+ }
(*env)->DeleteLocalRef(env, jpath);
}