diff --git a/libcontainerd/client_linux.go b/libcontainerd/client_linux.go index d2d91f2596..afb68b4a45 100644 --- a/libcontainerd/client_linux.go +++ b/libcontainerd/client_linux.go @@ -563,6 +563,8 @@ func (clnt *client) Restore(containerID string, options ...CreateOption) error { clnt.remote.Lock() return nil } + // relock because of the defer + clnt.remote.Lock() clnt.deleteContainer(containerID)