summaryrefslogtreecommitdiff
path: root/libpod/image/layer_tree.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-07 09:56:23 -0400
committerGitHub <noreply@github.com>2020-09-07 09:56:23 -0400
commitbe7778df6c70227dab760ea92637ed97dad29641 (patch)
treea36f88d9220d0abb82b1e3cbc409449ed38b4a1e /libpod/image/layer_tree.go
parente848fc6e155ab2b27358223e0ae8d7d011848775 (diff)
parent238abf6e2171f344bbb0ee2233a3e1f6b585ebb0 (diff)
downloadpodman-be7778df6c70227dab760ea92637ed97dad29641.tar.gz
podman-be7778df6c70227dab760ea92637ed97dad29641.tar.bz2
podman-be7778df6c70227dab760ea92637ed97dad29641.zip
Merge pull request #7554 from vrothberg/follow-up-on-7444
make image parent check more robust
Diffstat (limited to 'libpod/image/layer_tree.go')
-rw-r--r--libpod/image/layer_tree.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/image/layer_tree.go b/libpod/image/layer_tree.go
index 3699655fd..18101575e 100644
--- a/libpod/image/layer_tree.go
+++ b/libpod/image/layer_tree.go
@@ -32,7 +32,9 @@ func (t *layerTree) toOCI(ctx context.Context, i *Image) (*ociv1.Image, error) {
oci, exists := t.ociCache[i.ID()]
if !exists {
oci, err = i.ociv1Image(ctx)
- t.ociCache[i.ID()] = oci
+ if err == nil {
+ t.ociCache[i.ID()] = oci
+ }
}
return oci, err
}