summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/crypto.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c
index 9b5f38b2113..4ecda337c00 100644
--- a/sbin/iked/crypto.c
+++ b/sbin/iked/crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crypto.c,v 1.35 2021/11/18 22:42:02 tobhe Exp $ */
+/* $OpenBSD: crypto.c,v 1.36 2021/11/18 22:59:03 tb Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -551,10 +551,7 @@ cipher_free(struct iked_cipher *encr)
{
if (encr == NULL)
return;
- if (encr->encr_ctx != NULL) {
- EVP_CIPHER_CTX_cleanup(encr->encr_ctx);
- free(encr->encr_ctx);
- }
+ EVP_CIPHER_CTX_free(encr->encr_ctx);
ibuf_release(encr->encr_iv);
ibuf_release(encr->encr_key);
free(encr);