Module Name: src Committed By: snj Date: Fri Aug 18 15:05:29 UTC 2017
Modified Files: src/sys/dev/ic [netbsd-6-1]: dp83932.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1476): sys/dev/ic/dp83932.c: revision 1.41 Plug mbuf leak on MCLGET failure in sonic_rxintr. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.28.1 src/sys/dev/ic/dp83932.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/dp83932.c diff -u src/sys/dev/ic/dp83932.c:1.35 src/sys/dev/ic/dp83932.c:1.35.28.1 --- src/sys/dev/ic/dp83932.c:1.35 Sat Nov 13 13:52:00 2010 +++ src/sys/dev/ic/dp83932.c Fri Aug 18 15:05:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dp83932.c,v 1.35 2010/11/13 13:52:00 uebayasi Exp $ */ +/* $NetBSD: dp83932.c,v 1.35.28.1 2017/08/18 15:05:29 snj Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.35 2010/11/13 13:52:00 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.35.28.1 2017/08/18 15:05:29 snj Exp $"); #include <sys/param.h> @@ -785,8 +785,10 @@ sonic_rxintr(struct sonic_softc *sc) goto dropit; if (len > (MHLEN - 2)) { MCLGET(m, M_DONTWAIT); - if ((m->m_flags & M_EXT) == 0) + if ((m->m_flags & M_EXT) == 0) { + m_freem(m); goto dropit; + } } m->m_data += 2; /*