tpl/images: Close image file
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 25 Nov 2017 17:37:48 +0000 (18:37 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 25 Nov 2017 17:38:33 +0000 (18:38 +0100)
tpl/images/images.go

index 66999aa37968d507cf9f6d9702af88e3ce29a707..f5d32f4495052ae7e902a5ec89a3fd48a7d5e395 100644 (file)
@@ -71,6 +71,7 @@ func (ns *Namespace) Config(path interface{}) (image.Config, error) {
        if err != nil {
                return image.Config{}, err
        }
+       defer f.Close()
 
        config, _, err = image.DecodeConfig(f)
        if err != nil {