changeset 57960:3fee0e6b54f5

8230769: BufImg_SetupICM add ReleasePrimitiveArrayCritical call in early return Reviewed-by: prr, stuefe
author mbaesken
date Mon, 09 Sep 2019 16:34:45 +0200
parents d8f60e5bb4a6
children 8407928b9fe5
files src/java.desktop/share/native/libawt/awt/image/BufImgSurfaceData.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/native/libawt/awt/image/BufImgSurfaceData.c	Fri Sep 06 16:15:11 2019 +0200
+++ b/src/java.desktop/share/native/libawt/awt/image/BufImgSurfaceData.c	Mon Sep 09 16:34:45 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -351,6 +351,7 @@
 
         cData->img_clr_tbl = initCubemap(pRgb, bisdo->lutsize, 32);
         if (cData->img_clr_tbl == NULL) {
+            (*env)->ReleasePrimitiveArrayCritical(env, bisdo->lutarray, pRgb, JNI_ABORT);
             free(cData);
             return (ColorData*)NULL;
         }