Module Name: src Committed By: snj Date: Sat Aug 5 04:45:30 UTC 2017
Modified Files: src/sys/dev/ic [netbsd-8]: dp83932.c Log Message: Pull up following revision(s) (requested by spz in ticket #185): 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.40 -r1.40.2.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.40 src/sys/dev/ic/dp83932.c:1.40.2.1 --- src/sys/dev/ic/dp83932.c:1.40 Tue May 23 02:19:14 2017 +++ src/sys/dev/ic/dp83932.c Sat Aug 5 04:45:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dp83932.c,v 1.40 2017/05/23 02:19:14 ozaki-r Exp $ */ +/* $NetBSD: dp83932.c,v 1.40.2.1 2017/08/05 04:45:30 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.40 2017/05/23 02:19:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.40.2.1 2017/08/05 04:45:30 snj Exp $"); #include <sys/param.h> @@ -786,8 +786,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; /*