Skip to content

Commit

Permalink
defer tempfile close to avoid dangling FD
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Mar 17, 2014
1 parent fa6c096 commit bf9747a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions resource/template/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (t *TemplateResource) createStageFile() error {
os.Remove(temp.Name())
return err
}
defer temp.Close()
log.Debug("Compiling source template " + t.Src)
tplFuncMap := make(template.FuncMap)
tplFuncMap["Base"] = path.Base
Expand Down

0 comments on commit bf9747a

Please sign in to comment.