freebsd_network: Remove unneeded frees of if_l2com.
After 458c40fb27, if_l2com is not
allocated anymore, but I missed deleting these at that time.
This commit is contained in:
@@ -175,7 +175,7 @@ if_alloc_inplace(struct ifnet *ifp, u_char type)
|
|||||||
if (ifindex_alloc_locked(&index) != ENOERR) {
|
if (ifindex_alloc_locked(&index) != ENOERR) {
|
||||||
IFNET_WUNLOCK();
|
IFNET_WUNLOCK();
|
||||||
panic("too many devices");
|
panic("too many devices");
|
||||||
goto err3;
|
goto err2;
|
||||||
}
|
}
|
||||||
ifnet_setbyindex_locked(index, IFNET_HOLD);
|
ifnet_setbyindex_locked(index, IFNET_HOLD);
|
||||||
IFNET_WUNLOCK();
|
IFNET_WUNLOCK();
|
||||||
@@ -186,13 +186,6 @@ if_alloc_inplace(struct ifnet *ifp, u_char type)
|
|||||||
IF_ADDR_LOCK_INIT(ifp);
|
IF_ADDR_LOCK_INIT(ifp);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err3:
|
|
||||||
switch (type) {
|
|
||||||
case IFT_ETHER:
|
|
||||||
_kernel_free(ifp->if_l2com);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
err2:
|
err2:
|
||||||
delete_sem(ifp->receive_sem);
|
delete_sem(ifp->receive_sem);
|
||||||
|
|
||||||
@@ -229,11 +222,6 @@ if_free_inplace(struct ifnet *ifp)
|
|||||||
IFNET_WUNLOCK();
|
IFNET_WUNLOCK();
|
||||||
|
|
||||||
IF_ADDR_LOCK_DESTROY(ifp);
|
IF_ADDR_LOCK_DESTROY(ifp);
|
||||||
switch (ifp->if_type) {
|
|
||||||
case IFT_ETHER:
|
|
||||||
_kernel_free(ifp->if_l2com);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete_sem(ifp->receive_sem);
|
delete_sem(ifp->receive_sem);
|
||||||
ifq_uninit(&ifp->receive_queue);
|
ifq_uninit(&ifp->receive_queue);
|
||||||
|
|||||||
Reference in New Issue
Block a user