mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-29 12:35:19 +00:00
[FIXED JENKINS-18351] file descriptor leak while fingerprinting
This commit is contained in:
1 parent
0e1bc560ae
commit
93c31be1b7
2 files changed
+9
-1
No files matched your search
@@ -1664,7 +1664,12 @@ public final class FilePath implements Serializable {
|
||||
return act(new FileCallable<String>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public String invoke(File f, VirtualChannel channel) throws IOException {
|
||||
return Util.getDigestOf(new BufferedInputStream(new FileInputStream(f)));
|
||||
BufferedInputStream source = new BufferedInputStream(new FileInputStream(f));
|
||||
try {
|
||||
return Util.getDigestOf(source);
|
||||
} finally {
|
||||
source.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user