Do not leak open fd to config.json in newBundle
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
4793f968e5
commit
eae8ca69b7
1 changed files with 1 additions and 0 deletions
|
@ -179,6 +179,7 @@ func (r *Runtime) newBundle(id string, spec []byte) (string, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
_, err = io.Copy(f, bytes.NewReader(spec))
|
_, err = io.Copy(f, bytes.NewReader(spec))
|
||||||
return path, err
|
return path, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue