Fix daemon panic on restoring containers

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: c75de8e33cc0db5236eef6146f2de06533b46aa8
Component: engine
This commit is contained in:
Lei Jitang
2016-07-26 22:51:03 -04:00
parent fbd6f3276f
commit e4e65a85a5

View File

@ -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)