From: Boqin Qin Date: Mon, 20 Apr 2020 15:47:34 +0000 (+0800) Subject: hugolib: Add Unlock before panic X-Git-Tag: v0.69.1~8 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=736f84b2d539857f7fdd0e42353af80b4dccfe8d;p=brevno-suite%2Fhugo hugolib: Add Unlock before panic --- diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index 9ff4d36c..3183242b 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -987,6 +987,7 @@ func (m *contentChangeMap) add(dirname string, tp bundleDirType) { case bundleLeaf: m.leafBundles.Insert(dirname, true) default: + m.mu.Unlock() panic("invalid bundle type") } m.mu.Unlock()