[InMemory] Add missing mutex.RLock/RUnlock in List to protect internal map

of dir struct.

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
pull/129/head
Anton Tiurin 2015-02-02 22:56:09 +03:00
parent c41141fbd3
commit cea15b22e3
1 changed files with 3 additions and 0 deletions

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)