mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-05 15:37:02 +08:00
fix minor issue
When failed to attach veth pair, should remove the veth device Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
This commit is contained in:
@@ -171,7 +171,7 @@ func (v *veth) create(n *network, nspid int) (err error) {
|
||||
netlink.LinkDel(veth)
|
||||
}
|
||||
}()
|
||||
if err := v.attach(&n.Network); err != nil {
|
||||
if err = v.attach(&n.Network); err != nil {
|
||||
return err
|
||||
}
|
||||
child, err := netlink.LinkByName(n.TempVethPeerName)
|
||||
|
Reference in New Issue
Block a user