Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8213366

(fs) avoid handle leak in Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0

XMLWordPrintable

    • b19
    • windows
    • Not verified

      In Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstFile0, we have a special case where a handle obtained by FindFirstFileW has to be closed but is currently not closed. This could leak in seldom cases to leaks.
      FindFirstFileW returns a handle in case of a successful call . However this handle has to be closed later (with FindClose, see MSDN docu). In the special case of failing (*env)->NewString(...) , we miss the closing.

            mbaesken Matthias Baesken
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: