Merge pull request #24259 from emakrushin/containers

Unlock mutex before returning from function
This commit is contained in:
openshift-merge-bot[bot] 2024-10-14 21:09:26 +00:00 committed by GitHub
commit 3fbae8e28e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -467,6 +467,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
errMap, err := parallelctr.ContainerOp(ctx, libpodContainers, func(c *libpod.Container) error { errMap, err := parallelctr.ContainerOp(ctx, libpodContainers, func(c *libpod.Container) error {
mapMutex.Lock() mapMutex.Lock()
if _, ok := ctrsMap[c.ID()]; ok { if _, ok := ctrsMap[c.ID()]; ok {
mapMutex.Unlock()
return nil return nil
} }
mapMutex.Unlock() mapMutex.Unlock()