Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Use kmem_free for kmem_alloc'd memory



details:   https://anonhg.NetBSD.org/src/rev/1d69f9a36d89
branches:  trunk
changeset: 355239:1d69f9a36d89
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Jul 20 18:17:25 2017 +0000

description:
Use kmem_free for kmem_alloc'd memory

Fixes diagnostic crash on detach, tested by Riccardo Mottola

diffstat:

 sys/dev/ic/rt2860.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cca21821f804 -r 1d69f9a36d89 sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c       Thu Jul 20 18:12:51 2017 +0000
+++ b/sys/dev/ic/rt2860.c       Thu Jul 20 18:17:25 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rt2860.c,v 1.26 2017/05/23 02:19:14 ozaki-r Exp $      */
+/*     $NetBSD: rt2860.c,v 1.27 2017/07/20 18:17:25 maya Exp $ */
 /*     $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
 /*     $FreeBSD: head/sys/dev/ral/rt2860.c 306591 2016-10-02 20:35:55Z avos $ */
 
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.26 2017/05/23 02:19:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.27 2017/07/20 18:17:25 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -466,7 +466,7 @@
        }
 
        if (sc->ucode != NULL)
-               free(sc->ucode, M_DEVBUF);
+               firmware_free(sc->ucode, sc->ucsize);
 
        return 0;
 }



Home | Main Index | Thread Index | Old Index