Skip to content

Commit

Permalink
Fix errcheck: error return value of aufs.Unmount is not checked
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Rodák <[email protected]>
  • Loading branch information
Honny1 committed Jul 4, 2024
1 parent 7486553 commit c30b160
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/aufs/aufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,10 +679,13 @@ func (a *Driver) Cleanup() error {
}

func (a *Driver) aufsMount(ro []string, rw, target string, options graphdriver.MountOpts) (err error) {
defer func() {
defer func() error {
if err != nil {
Unmount(target)
if err1 := Unmount(target); err1 != nil {
logrus.Warnf("Unmount %s: %v", target, err1)
}
}
return err
}()

// Mount options are clipped to page size(4096 bytes). If there are more
Expand Down

0 comments on commit c30b160

Please sign in to comment.