1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #28644 from zhukj/daemon-config

close the file
This commit is contained in:
Lei Jitang 2016-11-21 13:50:26 +08:00 committed by GitHub
commit 103f2e56bf

View file

@ -140,6 +140,7 @@ func (daemon *Daemon) verifyVolumesInfo(container *container.Container) error {
if err != nil { if err != nil {
return errors.Wrap(err, "could not open container config") return errors.Wrap(err, "could not open container config")
} }
defer f.Close()
var cv volumes var cv volumes
if err := json.NewDecoder(f).Decode(&cv); err != nil { if err := json.NewDecoder(f).Decode(&cv); err != nil {
return errors.Wrap(err, "could not decode container config") return errors.Wrap(err, "could not decode container config")