RFR: 8292214: Memory leak in getAllConfigs of awt_GraphicsEnv.c:386 [v2]

Damon Nguyen dnguyen at openjdk.org
Mon Oct 3 17:00:22 UTC 2022


On Fri, 30 Sep 2022 14:46:35 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Alisen Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   changed loop end condition to ind-1
>
> src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c line 575:
> 
>> 573: cleanup:
>> 574:     if (success != JNI_TRUE) {
>> 575:         for (int i = 0; i < ind-1; i++) {
> 
> New `int i` declaration shadows previously declared `i`, I think it can be reused.

I tried building without the new int i and it does seem to be fine. Probably worth it to follow the rest of the class's format and reuse the i var for getAllConfigs.

-------------

PR: https://git.openjdk.org/jdk/pull/10378



More information about the client-libs-dev mailing list