Module Name:    src
Committed By:   riastradh
Date:           Sat Jul  4 18:07:31 UTC 2020

Modified Files:
        src/sys/opencrypto: cryptosoft.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/opencrypto/cryptosoft.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.56 src/sys/opencrypto/cryptosoft.c:1.57
--- src/sys/opencrypto/cryptosoft.c:1.56	Mon Jun 29 23:34:48 2020
+++ src/sys/opencrypto/cryptosoft.c	Sat Jul  4 18:07:31 2020
@@ -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 @@ swcr_freesession(void *arg, u_int64_t ti
 			}
 			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;
 

Reply via email to