diff --git a/libcontainerd/client_linux.go b/libcontainerd/client_linux.go index d2d91f2596c304c0c1d06d79bded0f6ff8d815f4..afb68b4a45b4a4bf99c57c64b55f3cf08e6f68da 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)