If frame length is excessive, don't leak an mbuf and cluster when

abandoning processing.

Found with:	Coverity Prevent (tm)
MFC after:	1 week
This commit is contained in:
Robert Watson 2006-01-15 12:06:09 +00:00
parent a7d46e8cf1
commit 63e0298298

View File

@ -1034,6 +1034,7 @@ an_rxeof(struct an_softc *sc)
/* Check for insane frame length */
len = an_rx_desc.an_len + 12;
if (len > MCLBYTES) {
m_freem(m);
printf("an%d: oversized packet "
"received (%d, %d)\n",
sc->an_unit, len, MCLBYTES);