Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Fix pasto that meant kmem_free was called t...



details:   https://anonhg.NetBSD.org/src/rev/77b86f6f7793
branches:  nick-nhusb
changeset: 804223:77b86f6f7793
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Dec 06 08:39:57 2014 +0000

description:
Fix pasto that meant kmem_free was called twice against sc_statusbuf. Free
sc_status instead.

diffstat:

 sys/dev/usb/uhub.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r cdbba83a0ba5 -r 77b86f6f7793 sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Sat Dec 06 08:37:30 2014 +0000
+++ b/sys/dev/usb/uhub.c        Sat Dec 06 08:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.126.2.5 2014/12/06 08:27:23 skrll Exp $     */
+/*     $NetBSD: uhub.c,v 1.126.2.6 2014/12/06 08:39:57 skrll Exp $     */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.126.2.5 2014/12/06 08:27:23 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.126.2.6 2014/12/06 08:39:57 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -356,7 +356,7 @@
 
  bad:
        if (sc->sc_status)
-               kmem_free(sc->sc_statusbuf, sc->sc_statuslen);
+               kmem_free(sc->sc_status, sc->sc_statuslen);
        if (sc->sc_statusbuf)
                kmem_free(sc->sc_statusbuf, sc->sc_statuslen);
        if (hub)
@@ -634,7 +634,7 @@
            sizeof(*hub) + (nports-1) * sizeof(struct usbd_port));
        sc->sc_hub->ud_hub = NULL;
        if (sc->sc_status)
-               kmem_free(sc->sc_statusbuf, sc->sc_statuslen);
+               kmem_free(sc->sc_status, sc->sc_statuslen);
        if (sc->sc_statusbuf)
                kmem_free(sc->sc_statusbuf, sc->sc_statuslen);
 



Home | Main Index | Thread Index | Old Index