Merge pull request #198 from tonistiigi/unlock-fix

imageresolver: fix concurrent map writes
docker-18.09
Akihiro Suda 2017-12-09 15:01:36 +09:00 committed by GitHub
commit 31e41a7ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ func (i *inMemoryIngester) reader(ctx context.Context, dgst digest.Digest) (*byt
func (i *inMemoryIngester) addMap(k digest.Digest, dt []byte) {
i.mu.Lock()
i.mu.Unlock()
defer i.mu.Unlock()
i.buffers[k] = dt
}