mirror of
https://github.com/safing/portmaster
synced 2025-04-12 15:09:09 +00:00
fix: close file
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
0f808f568b
commit
43043bc5e6
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue