On Wed, 21 Sep 2022 20:15:48 GMT, Alisen Chung <ach...@openjdk.org> wrote:
> changed return to cleanup in getAllConfigs > changed cleanup to loop thru and free all allocated memory adjacent to > graphicsConfig pointer src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c line 578: > 576: if (graphicsConfigs[i] != 0) { > 577: free(graphicsConfigs[i]); > 578: } It seems `screenDataPtr->numConfigs` is updated only when `success = JNI_TRUE` and here we are checking if `success != JNI_TRUE` condition, so amnot sure if we will be getting the correct updated configs number. I think condition should be `i< ind-1` which is updated before every allocation, but it should be verified. ------------- PR: https://git.openjdk.org/jdk/pull/10378