mirror of https://github.com/containers/podman.git
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:
parent
7ea6120794
commit
06b470d79b
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue