[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:
Anton Tiurin 2015-02-02 22:56:09 +03:00
parent c41141fbd3
commit cea15b22e3

View file

@ -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)