mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05: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:
parent
41c6c52ead
commit
94b616bdfa
1 changed files with 1 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue