mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix rename error when sid is empty
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
This commit is contained in:
parent
24e9ac1575
commit
b9ab129554
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ func (daemon *Daemon) ContainerRename(oldName, newName string) error {
|
|||
}()
|
||||
|
||||
sid = container.NetworkSettings.SandboxID
|
||||
if daemon.netController != nil {
|
||||
if sid != "" && daemon.netController != nil {
|
||||
sb, err = daemon.netController.SandboxByID(sid)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue