提交 e63774de 编写于 作者: O Oleg Nenashev

[JENKINS-42670] - Fix the potential File descriptor leak in the Windows Service installer

上级 2a97bf41
......@@ -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());
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册