forked from TrueCloudLab/distribution
[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
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue