Fix a possible mbuf leak on interface departure.

Reported by:	Alexandre Martins
This commit is contained in:
Andrey V. Elsukov 2015-03-26 23:40:22 +00:00
parent 5ab58881db
commit a4b65afcab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280720

View File

@ -1669,7 +1669,11 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
ETHER_BPF_MTAP(scifp, m);
m = (lp->lp_detaching == 0) ? lagg_proto_input(sc, lp, m) : NULL;
if (lp->lp_detaching != 0) {
m_freem(m);
m = NULL;
} else
m = lagg_proto_input(sc, lp, m);
if (m != NULL) {
if (scifp->if_flags & IFF_MONITOR) {