hugolib: Add Unlock before panic

This commit is contained in:
Boqin Qin 2020-04-20 23:47:34 +08:00 committed by GitHub
parent cd4d820201
commit 736f84b2d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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()