RFR [XS] : 8213366: (fs) avoid handle leak in Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0

Alan Bateman Alan.Bateman at oracle.com
Wed Nov 7 09:05:38 UTC 2018


On 07/11/2018 09:02, Baesken, Matthias wrote:
> Hi Alan,  Chris     thanks  for  the reviews , pushed !
>
> 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/windows/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


More information about the nio-dev mailing list