summaryrefslogtreecommitdiff
path: root/libpod/rootless_cni_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/rootless_cni_linux.go')
-rw-r--r--libpod/rootless_cni_linux.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/rootless_cni_linux.go b/libpod/rootless_cni_linux.go
index ce8a87759..9a980750f 100644
--- a/libpod/rootless_cni_linux.go
+++ b/libpod/rootless_cni_linux.go
@@ -110,6 +110,8 @@ func DeallocRootlessCNI(ctx context.Context, c *Container) error {
logrus.Warn(err)
}
logrus.Debugf("rootless CNI: removing infra container %q", infra.ID())
+ infra.lock.Lock()
+ defer infra.lock.Unlock()
if err := c.runtime.removeContainer(ctx, infra, true, false, true); err != nil {
return err
}