From: tb Date: Thu, 18 Nov 2021 22:59:03 +0000 (+0000) Subject: iked: replace a conditional EVP_CIPHER_CTX_cleanup() + free() stanza X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=422a8d39fca0351f3a77b7e49b15ddac8b3d2ec2;p=openbsd iked: replace a conditional EVP_CIPHER_CTX_cleanup() + free() stanza with an unconditional EVP_CIPHER_CTX_free(). ok tobhe --- 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 @@ -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);