summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/glxsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/pci/glxsb.c')
-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);