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 a kmem_free size. From Takahiro HAYASHI



details:   https://anonhg.NetBSD.org/src/rev/0a3f860d7596
branches:  nick-nhusb
changeset: 334083:0a3f860d7596
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Dec 07 20:42:11 2014 +0000

description:
Fix a kmem_free size. From Takahiro HAYASHI

diffstat:

 sys/dev/usb/uaudio.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 0b62b96cab22 -r 0a3f860d7596 sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c      Sat Dec 06 09:07:59 2014 +0000
+++ b/sys/dev/usb/uaudio.c      Sun Dec 07 20:42:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uaudio.c,v 1.140.2.4 2014/12/03 14:18:07 skrll Exp $   */
+/*     $NetBSD: uaudio.c,v 1.140.2.5 2014/12/07 20:42:11 skrll Exp $   */
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.140.2.4 2014/12/03 14:18:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.140.2.5 2014/12/07 20:42:11 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1540,8 +1540,7 @@
        /* Copy old data, if there was any */
        if (sc->sc_nalts != 0) {
                memcpy(nai, sc->sc_alts, sizeof(*ai) * (sc->sc_nalts));
-               kmem_free(sc->sc_alts,
-                   sizeof(struct audio_format) * sc->sc_nalts);
+               kmem_free(sc->sc_alts, sizeof(*ai) * sc->sc_nalts);
        }
        sc->sc_alts = nai;
        DPRINTFN(2,"adding alt=%d, enc=%d\n",



Home | Main Index | Thread Index | Old Index