Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto Fix kmem_free size in recent malloc->kmem con...



details:   https://anonhg.NetBSD.org/src/rev/8c505a5be10d
branches:  trunk
changeset: 973581:8c505a5be10d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jul 04 18:07:31 2020 +0000

description:
Fix kmem_free size in recent malloc->kmem conversion.

Should address this bracket report that has my name all over it:

https://mail-index.netbsd.org/current-users/2020/07/04/msg039059.html

diffstat:

 sys/opencrypto/cryptosoft.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 64f26a90fb19 -r 8c505a5be10d sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c       Sat Jul 04 17:41:04 2020 +0000
+++ b/sys/opencrypto/cryptosoft.c       Sat Jul 04 18:07:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptosoft.c,v 1.56 2020/06/29 23:34:48 riastradh Exp $ */
+/*     $NetBSD: cryptosoft.c,v 1.57 2020/07/04 18:07:31 riastradh Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $       */
 /*     $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
 
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.56 2020/06/29 23:34:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.57 2020/07/04 18:07:31 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1096,7 +1096,7 @@
                        }
                        if (swd->sw_octx) {
                                explicit_memset(swd->sw_octx, 0, swd->sw_klen);
-                               kmem_free(swd->sw_octx, axf->ctxsize);
+                               kmem_free(swd->sw_octx, swd->sw_klen);
                        }
                        break;
 



Home | Main Index | Thread Index | Old Index