diff options
author | eri <eri@FreeBSD.org> | 2011-03-04 20:37:38 +0000 |
---|---|---|
committer | eri <eri@FreeBSD.org> | 2011-03-04 20:37:38 +0000 |
commit | 2ad117efbde9b99d429aadcbea6799e5629cb5d9 (patch) | |
tree | 2603a1c062bb239f3fdb09f7789b5de8bc7e8a3c /sys/net/if_lagg.c | |
parent | e78a2a669a5132f3565e28e2cc0ec767b04077c1 (diff) | |
download | FreeBSD-src-2ad117efbde9b99d429aadcbea6799e5629cb5d9.zip FreeBSD-src-2ad117efbde9b99d429aadcbea6799e5629cb5d9.tar.gz |
Fix a panic that can happen when trying to destroy a lagg(4) with scheduler set to none.
Approved by: thompsa(mentor)
MFC after: 1 week
Diffstat (limited to 'sys/net/if_lagg.c')
-rw-r--r-- | sys/net/if_lagg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 8911cee..ee586ad 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -341,7 +341,8 @@ lagg_clone_destroy(struct ifnet *ifp) while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) lagg_port_destroy(lp, 1); /* Unhook the aggregation protocol */ - (*sc->sc_detach)(sc); + if (sc->sc_detach != NULL) + (*sc->sc_detach)(sc); LAGG_WUNLOCK(sc); |