mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
[CID-992725] - Resource leak in ClientAuthenticationCache
Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
This commit is contained in:
1 parent
9e72099115
commit
3a8b81a0fc
1 file changed
+7
-1
@@ -13,6 +13,7 @@ import org.springframework.dao.DataAccessException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
@@ -50,7 +51,12 @@ public class ClientAuthenticationCache implements Serializable {
|
||||
}
|
||||
});
|
||||
if (store.exists()) {
|
||||
props.load(store.read());
|
||||
InputStream istream = store.read();
|
||||
try {
|
||||
props.load(istream);
|
||||
} finally {
|
||||
istream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user