if: Free subqueue memory upon if_detach
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 13 Jan 2013 04:24:11 +0000 (12:24 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 13 Jan 2013 04:24:11 +0000 (12:24 +0800)
sys/net/if.c

index be9da89..f20b1c0 100644 (file)
@@ -854,6 +854,8 @@ if_detach(struct ifnet *ifp)
                kfree(ifsq->ifsq_ifstart_nmsg, M_LWKTMSG);
                kfree(ifsq->ifsq_stage, M_DEVBUF);
        }
+       kfree(ifp->if_snd.altq_subq, M_DEVBUF);
+
        crit_exit();
 }