From 405c2f6899fbe008df8ccd45355bd31846cf1b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 18 May 2017 23:23:29 +0300 Subject: [PATCH] tpl/images: Fix error handling in Config --- tpl/images/images.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tpl/images/images.go b/tpl/images/images.go index 9244323b4..d08033f2d 100644 --- a/tpl/images/images.go +++ b/tpl/images/images.go @@ -70,10 +70,13 @@ func (ns *Namespace) Config(path interface{}) (image.Config, error) { } config, _, err = image.DecodeConfig(f) + if err != nil { + return config, err + } ns.cacheMu.Lock() ns.cache[filename] = config ns.cacheMu.Unlock() - return config, err + return config, nil }