mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
[JENKINS-42670] - Fix the potential File descriptor leak in the Windows Service installer
This commit is contained in:
1 parent
2a97bf41fb
commit
e63774decd
1 file changed
+3
-3
@@ -306,9 +306,9 @@ public class WindowsInstallerLink extends ManagementLink {
|
||||
try {
|
||||
return Kernel32Utils.waitForExitProcess(sei.hProcess);
|
||||
} finally {
|
||||
FileInputStream fin = new FileInputStream(new File(pwd,"redirect.log"));
|
||||
IOUtils.copy(fin, out.getLogger());
|
||||
fin.close();
|
||||
try (FileInputStream fin = new FileInputStream(new File(pwd,"redirect.log"))) {
|
||||
IOUtils.copy(fin, out.getLogger());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user