From 3072fce0671c5529a42b9e40a5344cce99318312 Mon Sep 17 00:00:00 2001
From: lixiaobing10051267
Date: Wed, 28 Jun 2017 14:49:12 +0800
Subject: [PATCH] add f.Close() after dockerignore.ReadAll(f) before return err
Signed-off-by: lixiaobing10051267 Signed-off-by:
Sebastiaan van Stijn
---
builder/remotecontext/detect.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/builder/remotecontext/detect.go b/builder/remotecontext/detect.go
index 22ad5b7c9f..4345736805 100644
--- a/builder/remotecontext/detect.go
+++ b/builder/remotecontext/detect.go
@@ -131,6 +131,7 @@ func removeDockerfile(c modifiableContext, filesToRemove ...string) error {
}
excludes, err := dockerignore.ReadAll(f)
if err != nil {
+ f.Close()
return err
}
f.Close()