Module Name:    src
Committed By:   snj
Date:           Sat Aug 12 03:42:52 UTC 2017

Modified Files:
        src/sys/dev/ic [netbsd-7]: dp83932.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1472):
        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.36 -r1.36.4.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.36 src/sys/dev/ic/dp83932.c:1.36.4.1
--- src/sys/dev/ic/dp83932.c:1.36	Fri Oct 25 21:29:28 2013
+++ src/sys/dev/ic/dp83932.c	Sat Aug 12 03:42:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: dp83932.c,v 1.36 2013/10/25 21:29:28 martin Exp $	*/
+/*	$NetBSD: dp83932.c,v 1.36.4.1 2017/08/12 03:42:52 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.36 2013/10/25 21:29:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.36.4.1 2017/08/12 03:42:52 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;
 			/*

Reply via email to