This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygwin: Fix resource leak in readdir reparse point handling


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=be1485191f17b63dacea88f2f3fc4e68e9fec36e

commit be1485191f17b63dacea88f2f3fc4e68e9fec36e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Mon Jul 24 17:26:17 2017 +0200

    cygwin: Fix resource leak in readdir reparse point handling
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler_disk_file.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index ca1da38..6cc081d 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -216,8 +216,8 @@ readdir_check_reparse_point (POBJECT_ATTRIBUTES attr, bool remote)
 		    ret = true;
 		}
 	    }
-	  NtClose (reph);
 	}
+      NtClose (reph);
     }
   return ret;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]