mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue