builder-next: avoid double unmounting mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 9ea2cf320ad2687a51aea1ed849f86f465cbc1d9)
diff --git a/builder/builder-next/adapters/snapshot/snapshot.go b/builder/builder-next/adapters/snapshot/snapshot.go
index 3a722e5..1e5402d 100644
--- a/builder/builder-next/adapters/snapshot/snapshot.go
+++ b/builder/builder-next/adapters/snapshot/snapshot.go
@@ -480,6 +480,9 @@
}
m.mounts = nil
+ defer func() {
+ m.release = nil
+ }()
return m.release()
}