1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

builder: fix concurrent map write

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 5ad981640f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Tonis Tiigi 2020-04-03 15:33:15 -07:00 committed by Sebastiaan van Stijn
parent 0df114a8f8
commit f34a5b5af0
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -241,7 +241,9 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder.
}
defer func() {
b.mu.Lock()
delete(b.jobs, buildID)
b.mu.Unlock()
}()
}