提交 21ba31af 编写于 作者: O Oleg Nenashev

[CID-1182127] - Resource leak in HsErrPidList constructor.

Signed-off-by: NOleg Nenashev <o.v.nenashev@gmail.com>
上级 3a8b81a0
......@@ -47,8 +47,15 @@ public class HsErrPidList extends AdministrativeMonitor {
return;
}
try {
FileChannel ch = new FileInputStream(getSecretKeyFile()).getChannel();
FileChannel ch = null;
try {
ch = new FileInputStream(getSecretKeyFile()).getChannel();
map = ch.map(MapMode.READ_ONLY,0,1);
} finally {
if (ch != null) {
ch.close();
}
}
scan("./hs_err_pid%p.log");
if (Functions.isWindows()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册