summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2017-12-27 15:10:17 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2017-12-27 15:10:17 +0000
commit4c909f21f8a47058978214ad2f1df6a9c2d15510 (patch)
tree6f0d754bc89736d607c79e039a4cb465ca9ad7da /sys/arch
parent947754f2e927d9ba1007173cba01173d393332d3 (diff)
Add sizes for free() in the Geode LX Security Block crypto accelerator.
OK visa@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/pci/glxsb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c
index 8316b42a1b2..1f47db76948 100644
--- a/sys/arch/i386/pci/glxsb.c
+++ b/sys/arch/i386/pci/glxsb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxsb.c,v 1.33 2017/09/08 05:36:51 deraadt Exp $ */
+/* $OpenBSD: glxsb.c,v 1.34 2017/12/27 15:10:16 fcambus Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
@@ -525,22 +525,22 @@ glxsb_crypto_freesession(uint64_t tid)
if (swd->sw_kschedule) {
explicit_bzero(swd->sw_kschedule, txf->ctxsize);
- free(swd->sw_kschedule, M_CRYPTO_DATA, 0);
+ free(swd->sw_kschedule, M_CRYPTO_DATA, txf->ctxsize);
}
- free(swd, M_CRYPTO_DATA, 0);
+ free(swd, M_CRYPTO_DATA, sizeof(*swd));
}
if ((swd = sc->sc_sessions[sesn].ses_swd_auth)) {
axf = swd->sw_axf;
if (swd->sw_ictx) {
explicit_bzero(swd->sw_ictx, axf->ctxsize);
- free(swd->sw_ictx, M_CRYPTO_DATA, 0);
+ free(swd->sw_ictx, M_CRYPTO_DATA, axf->ctxsize);
}
if (swd->sw_octx) {
explicit_bzero(swd->sw_octx, axf->ctxsize);
- free(swd->sw_octx, M_CRYPTO_DATA, 0);
+ free(swd->sw_octx, M_CRYPTO_DATA, axf->ctxsize);
}
- free(swd, M_CRYPTO_DATA, sizeof *swd);
+ free(swd, M_CRYPTO_DATA, sizeof(*swd));
}
explicit_bzero(&sc->sc_sessions[sesn], sizeof(sc->sc_sessions[sesn]));
return (0);