Merge pull request #1521 from testwill/close_file

fix: close file
This commit is contained in:
Daniel Hååvi
2024-05-28 14:47:32 +02:00
committed by GitHub

View File

@@ -30,6 +30,10 @@ func (p *Process) GetExecHash(algorithm string) (string, error) {
return "", err
}
defer func() {
_ = file.Close()
}()
_, err = io.Copy(hasher, file)
if err != nil {
return "", err