summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-11-18 22:59:04 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-11-18 22:59:04 +0000
commit1500f0312b05d2d91c8bb51045de0e7078985472 (patch)
tree7fc292a53cf6d18ead087898dcaecd2f788d5198 /sbin
parentcbea4b5d933ddbe83fa60a3aba30fef34b5ba1e5 (diff)
iked: replace a conditional EVP_CIPHER_CTX_cleanup() + free() stanza
with an unconditional EVP_CIPHER_CTX_free(). ok tobhe
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);