Skip to content

Commit

Permalink
fix: temp file leak during hash computation (#1641)
Browse files Browse the repository at this point in the history
Fix a temp file leak when computing dmverity root hash. This
mainly affects `dmverity-vhd` tool and users may see their temp
storage filling up.

Signed-off-by: Maksim An <[email protected]>
  • Loading branch information
anmaxvl authored Feb 14, 2023
1 parent a996c74 commit 69927ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext4/tar2ext4/tar2ext4.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func ConvertAndComputeRootDigest(r io.Reader) (string, error) {
defer func() {
_ = os.Remove(out.Name())
}()
defer out.Close()

options := []Option{
ConvertWhiteout,
Expand Down

0 comments on commit 69927ff

Please sign in to comment.