From: Bjørn Erik Pedersen Date: Sat, 16 Mar 2019 08:40:27 +0000 (+0100) Subject: tpl/tplimpl: Fix mutex unlock X-Git-Tag: v0.55.0~49 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e54213f5257267ed232b2465337c39ddc8c73388;p=brevno-suite%2Fhugo tpl/tplimpl: Fix mutex unlock --- diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go index 8efeb6ce..26a41810 100644 --- a/tpl/tplimpl/template.go +++ b/tpl/tplimpl/template.go @@ -107,7 +107,7 @@ type templateHandler struct { // template funcs etc. built-in. func (t *templateHandler) NewTextTemplate() tpl.TemplateParseFinder { t.mu.Lock() - t.mu.Unlock() + defer t.mu.Unlock() tt := &textTemplate{t: texttemplate.New("")} t.extTextTemplates = append(t.extTextTemplates, tt)