Skip to content

Commit d4091ef

Browse files
committed
fix minor issue
When failed to attach veth pair, should remove the veth device Signed-off-by: Wentao Zhang <[email protected]>
1 parent 31980a5 commit d4091ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/network_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ func (v *veth) create(n *network, nspid int) (err error) {
171171
netlink.LinkDel(veth)
172172
}
173173
}()
174-
if err := v.attach(&n.Network); err != nil {
174+
if err = v.attach(&n.Network); err != nil {
175175
return err
176176
}
177177
child, err := netlink.LinkByName(n.TempVethPeerName)

0 commit comments

Comments
 (0)