mirror of
https://github.com/distribution/distribution
synced 2024-11-12 05:45:51 +01:00
[InMemory] Add missing mutex.RLock/RUnlock in List to protect internal map
of dir struct. Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
This commit is contained in:
parent
c41141fbd3
commit
cea15b22e3
@ -194,6 +194,9 @@ func (d *Driver) List(path string) ([]string, error) {
|
||||
return nil, storagedriver.InvalidPathError{Path: path}
|
||||
}
|
||||
|
||||
d.mutex.RLock()
|
||||
defer d.mutex.RUnlock()
|
||||
|
||||
normalized := normalize(path)
|
||||
|
||||
found := d.root.find(normalized)
|
||||
|
Loading…
Reference in New Issue
Block a user