Fix errcheck: error return value of `snapshot.Destroy` is not checked

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
Jan Rodák 2024-07-03 10:54:07 +02:00
parent ba0e86eea0
commit 407c5e4651
No known key found for this signature in database
GPG Key ID: E82E2FA0E160318E
1 changed files with 3 additions and 1 deletions

View File

@ -240,7 +240,9 @@ func (d *Driver) cloneFilesystem(name, parentName string) error {
}
if err != nil {
snapshot.Destroy(zfs.DestroyDeferDeletion)
if err1 := snapshot.Destroy(zfs.DestroyDeferDeletion); err1 != nil {
logrus.Warnf("Destroy zfs.DestroyDeferDeletion: %v", err1)
}
return err
}
return snapshot.Destroy(zfs.DestroyDeferDeletion)