hugolib: Add Unlock before panic
authorBoqin Qin <bobbqqin@bupt.edu.cn>
Mon, 20 Apr 2020 15:47:34 +0000 (23:47 +0800)
committerGitHub <noreply@github.com>
Mon, 20 Apr 2020 15:47:34 +0000 (17:47 +0200)
hugolib/hugo_sites.go

index 9ff4d36cd236536d1e9441db6bfee65676a80a4a..3183242b7c2b6ecff5392285368f81963ed25f28 100644 (file)
@@ -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()