Hi Sergey, thanks for commenting. I opened the following bug for it : https://bugs.openjdk.java.net/browse/JDK-8213532
webrev : http://cr.openjdk.java.net/~mbaesken/webrevs/8213532.0/ Best regards, Matthias > -----Original Message----- > From: Sergey Bylokhov <sergey.bylok...@oracle.com> > Sent: Mittwoch, 7. November 2018 23:15 > To: Baesken, Matthias <matthias.baes...@sap.com>; awt- > d...@openjdk.java.net > Cc: Alan Bateman (alan.bate...@oracle.com) <alan.bate...@oracle.com> > Subject: Re: <AWT Dev> FW: RFR [XS] : 8213366: (fs) avoid handle leak in > Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0 > > Hi, Matthias. > > The contributions for such issues are welcome. > > On 07/11/2018 01:16, Baesken, Matthias wrote: > > Okay, forwarding to awt-dev ... > > .......... > >> > >> Btw. while looking for other small leaks (unrelated to nio ) > >> > >> > >> I noticed a few "shaky" places in the Windows-coding when it comes to > >> > >> FormatMessage( ... FORMAT_MESSAGE_ALLOCATE_BUFFER, ... ) + > (missing) follow-up LocalFree . > >> > >> Examples : > >> > >> > https://hg.openjdk.java.net/jdk/jdk/file/a0ea20bc7af0/src/jdk.accessibility/ > windows/native/common/AccessBridgeDebug.cpp#l51 > >> > >> (debug-only code) : > >> > >> > https://hg.openjdk.java.net/jdk/jdk/file/a0ea20bc7af0/src/java.desktop/wi > ndows/native/libawt/windows/ThemeReader.cpp#l254 > >> > >> Should those be fixed in another CR (or is it considered not so important > (just Windows, and maybe also only debug-related code ?) > >> > > It would be better to discuss those on awt-dev as any changes in those > > areas will need a separate JBS issue. > > > > -Alan > >