Merge pull request #4638 from lavalamp/fix7

fix confusing defer
pull/6/head
Yu-Ju Hong 2015-02-19 17:22:36 -08:00
commit a08c88532c
1 changed files with 1 additions and 1 deletions

View File

@ -686,7 +686,7 @@ func (kl *Kubelet) runContainer(pod *api.BoundPod, container *api.Container, pod
// TODO: Clean up the previouly created dir? return the error?
glog.Errorf("Error on creating termination-log file %q: %v", containerLogPath, err)
} else {
defer fs.Close()
fs.Close() // Close immediately; we're just doing a `touch` here
b := fmt.Sprintf("%s:%s", containerLogPath, container.TerminationMessagePath)
binds = append(binds, b)
}