Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/sys/dev/ic Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/2417a1bbd45d
branches:  netbsd-6-0
changeset: 775238:2417a1bbd45d
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Aug 18 15:05:52 2017 +0000

description:
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.

diffstat:

 sys/dev/ic/dp83932.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r f31411c8952e -r 2417a1bbd45d sys/dev/ic/dp83932.c
--- a/sys/dev/ic/dp83932.c      Fri Aug 18 15:02:11 2017 +0000
+++ b/sys/dev/ic/dp83932.c      Fri Aug 18 15:05:52 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dp83932.c,v 1.35 2010/11/13 13:52:00 uebayasi Exp $    */
+/*     $NetBSD: dp83932.c,v 1.35.20.1 2017/08/18 15:05: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.35 2010/11/13 13:52:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dp83932.c,v 1.35.20.1 2017/08/18 15:05:52 snj Exp $");
 
 
 #include <sys/param.h>
@@ -785,8 +785,10 @@
                                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;
                        /*



Home | Main Index | Thread Index | Old Index