mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 10:18:40 +00:00
config: Fix a potential deadlock in config reading
Note that the deadlock has not been seen earlier, in tests on in real Hugo sites. Fixes #8791
This commit is contained in:
1 file changed
+1
@@ -89,6 +89,7 @@ func (c *defaultConfigProvider) Get(k string) interface{} {
|
||||
c.mu.RLock()
|
||||
key, m := c.getNestedKeyAndMap(strings.ToLower(k), false)
|
||||
if m == nil {
|
||||
c.mu.RUnlock()
|
||||
return nil
|
||||
}
|
||||
v := m[key]
|
||||
|
||||
Reference in new issue
Block a user