From cf3ef262b161f1c3dd61f5689e2853c2e8ec8b70 Mon Sep 17 00:00:00 2001 From: zhukj Date: Mon, 21 Nov 2016 19:56:01 +0800 Subject: [PATCH] close the file Signed-off-by: zhukj --- daemon/volumes_unix.go | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/volumes_unix.go b/daemon/volumes_unix.go index 61665e1e4b..29dffa9ea0 100644 --- a/daemon/volumes_unix.go +++ b/daemon/volumes_unix.go @@ -140,6 +140,7 @@ func (daemon *Daemon) verifyVolumesInfo(container *container.Container) error { if err != nil { return errors.Wrap(err, "could not open container config") } + defer f.Close() var cv volumes if err := json.NewDecoder(f).Decode(&cv); err != nil { return errors.Wrap(err, "could not decode container config")