From 3fe1c0faa97d9024385d6c64aa36757a7e7db4b6 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Tue, 7 Aug 2007 09:45:25 +0000 Subject: do not leak sessions; ok hshoexer, tom, deraadt --- sys/arch/i386/i386/via.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch') diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c index d33ea3bb516..9060e5aa67c 100644 --- a/sys/arch/i386/i386/via.c +++ b/sys/arch/i386/i386/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.10 2007/05/27 07:17:47 tedu Exp $ */ +/* $OpenBSD: via.c,v 1.11 2007/08/07 09:45:24 markus Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -188,6 +188,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) cw0 = C3_CRYPT_CWLO_KEY256; break; default: + viac3_crypto_freesession(sesn); return (EINVAL); } cw0 |= C3_CRYPT_CWLO_ALG_AES | C3_CRYPT_CWLO_KEYGEN_SW | @@ -276,6 +277,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) break; default: + viac3_crypto_freesession(sesn); return (EINVAL); } } -- cgit v1.2.3