ソースを参照

close the file

Signed-off-by: zhukj <zhu.kunjia@zte.com.cn>
zhukj 8 年 前
コミット
cf3ef262b1
1 ファイル変更1 行追加0 行削除
  1. 1 0
      daemon/volumes_unix.go

+ 1 - 0
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")