From 5bc0c43c7337dfbbe3a8da99dc3a3beac91e93d9 Mon Sep 17 00:00:00 2001 From: Jess Valarezo Date: Tue, 2 Jan 2018 21:23:35 -0500 Subject: [PATCH] rootfs: remove upper snapshot after use Signed-off-by: Jess Valarezo --- rootfs/diff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/diff.go b/rootfs/diff.go index bab7a3cca..89ed71d03 100644 --- a/rootfs/diff.go +++ b/rootfs/diff.go @@ -39,7 +39,7 @@ func Diff(ctx context.Context, snapshotID string, sn snapshots.Snapshotter, d di if err != nil { return ocispec.Descriptor{}, err } - defer sn.Remove(ctx, lowerKey) + defer sn.Remove(ctx, upperKey) } return d.DiffMounts(ctx, lower, upper, opts...)