mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02: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:
@@ -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