mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
Unlock mutex before returning from function
mapMutex is initialized in the ContainerRm function and cannot be released from outside, thus unlock mutex before returning from function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Егор Макрушин <emakrushin@astralinux.ru>
This commit is contained in:
@@ -467,6 +467,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string,
|
||||
errMap, err := parallelctr.ContainerOp(ctx, libpodContainers, func(c *libpod.Container) error {
|
||||
mapMutex.Lock()
|
||||
if _, ok := ctrsMap[c.ID()]; ok {
|
||||
mapMutex.Unlock()
|
||||
return nil
|
||||
}
|
||||
mapMutex.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user