prevent a panic when the netdev/ifp is not set in attach
(internal c63a7b85) MFC after: 3 days
This commit is contained in:
parent
275b78396e
commit
441ab64f52
@ -2260,7 +2260,8 @@ netmap_attach(struct netmap_adapter *arg)
|
||||
|
||||
fail:
|
||||
D("fail, arg %p ifp %p na %p", arg, ifp, hwna);
|
||||
netmap_detach(ifp);
|
||||
if (ifp)
|
||||
netmap_detach(ifp);
|
||||
return (hwna ? EINVAL : ENOMEM);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user