Skip to content

Commit

Permalink
config: Fix a potential deadlock in config reading
Browse files Browse the repository at this point in the history
Note that the deadlock has not been seen earlier, in tests on in real Hugo sites.

Fixes #8791
  • Loading branch information
bep committed Jul 30, 2021
1 parent 41c6c52 commit 94b616b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/defaultConfigProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 94b616b

Please sign in to comment.