Source-Changes-HG archive

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

[src/trunk]: src/sys/dev m_free -> m_freem, m_copyback could have added mbufs...



details:   https://anonhg.NetBSD.org/src/rev/07b5d183026c
branches:  trunk
changeset: 322131:07b5d183026c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Apr 18 14:56:35 2018 +0000

description:
m_free -> m_freem, m_copyback could have added mbufs in the chain

diffstat:

 sys/dev/sdmmc/sbt.c |  8 ++++----
 sys/dev/usb/ubt.c   |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r c980a045a951 -r 07b5d183026c sys/dev/sdmmc/sbt.c
--- a/sys/dev/sdmmc/sbt.c       Wed Apr 18 14:47:11 2018 +0000
+++ b/sys/dev/sdmmc/sbt.c       Wed Apr 18 14:56:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbt.c,v 1.5 2016/07/14 04:00:46 msaitoh Exp $  */
+/*     $NetBSD: sbt.c,v 1.6 2018/04/18 14:56:35 maxv Exp $     */
 /*     $OpenBSD: sbt.c,v 1.9 2007/06/19 07:59:57 uwe Exp $     */
 
 /*
@@ -20,7 +20,7 @@
 /* Driver for Type-A/B SDIO Bluetooth cards */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.5 2016/07/14 04:00:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.6 2018/04/18 14:56:35 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -357,7 +357,7 @@
                m->m_len = MIN(MHLEN, m->m_pkthdr.len);
        } else {
                DPRINTF(("%s: sbt_intr: m_copyback failed\n", DEVNAME(sc)));
-               m_free(m);
+               m_freem(m);
                m = NULL;
        }
 
@@ -383,7 +383,7 @@
                        DPRINTF(("%s: recv 0x%x packet (%d bytes)\n",
                            DEVNAME(sc), sc->sc_buf[0], m->m_pkthdr.len));
                        sc->sc_stats.err_rx++;
-                       m_free(m);
+                       m_freem(m);
                        break;
                }
        } else
diff -r c980a045a951 -r 07b5d183026c sys/dev/usb/ubt.c
--- a/sys/dev/usb/ubt.c Wed Apr 18 14:47:11 2018 +0000
+++ b/sys/dev/usb/ubt.c Wed Apr 18 14:56:35 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ubt.c,v 1.60 2018/01/21 13:57:12 skrll Exp $   */
+/*     $NetBSD: ubt.c,v 1.61 2018/04/18 15:01:03 maxv Exp $    */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.60 2018/01/21 13:57:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.61 2018/04/18 15:01:03 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1528,7 +1528,7 @@
        m->m_pkthdr.len = m->m_len = MHLEN;
        m_copyback(m, 1, count, buf);   // (extends if necessary)
        if (m->m_pkthdr.len != MAX(MHLEN, count + 1)) {
-               m_free(m);
+               m_freem(m);
                return NULL;
        }
 



Home | Main Index | Thread Index | Old Index