Merge pull request #591 from ijc25/config-json-fd-leak

Do not leak open fd to config.json in newBundle
This commit is contained in:
Michael Crosby 2017-03-01 11:10:37 -08:00 committed by GitHub
commit 5e6eb1ddc7
1 changed files with 1 additions and 0 deletions

View File

@ -179,6 +179,7 @@ func (r *Runtime) newBundle(id string, spec []byte) (string, error) {
if err != nil {
return "", err
}
defer f.Close()
_, err = io.Copy(f, bytes.NewReader(spec))
return path, err
}