summaryrefslogtreecommitdiff
path: root/sys/crypto/cryptodev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/crypto/cryptodev.c')
-rw-r--r--sys/crypto/cryptodev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/crypto/cryptodev.c b/sys/crypto/cryptodev.c
index fd0b9a5b0de..6e8fe3ef372 100644
--- a/sys/crypto/cryptodev.c
+++ b/sys/crypto/cryptodev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptodev.c,v 1.48 2002/06/12 04:16:02 deraadt Exp $ */
+/* $OpenBSD: cryptodev.c,v 1.49 2002/06/12 17:25:38 markus Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
@@ -277,10 +277,12 @@ cryptof_ioctl(fp, cmd, data, p)
sop->ses = cse->ses;
bail:
- if (crie.cri_key)
- FREE(crie.cri_key, M_XDATA);
- if (cria.cri_key)
- FREE(cria.cri_key, M_XDATA);
+ if (error) {
+ if (crie.cri_key)
+ FREE(crie.cri_key, M_XDATA);
+ if (cria.cri_key)
+ FREE(cria.cri_key, M_XDATA);
+ }
break;
case CIOCFSESSION: