aboutsummaryrefslogtreecommitdiff
path: root/crypto/modes/siv128.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/modes/siv128.c')
-rw-r--r--crypto/modes/siv128.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/modes/siv128.c b/crypto/modes/siv128.c
index 72526b849eaf..4e52d8eb8782 100644
--- a/crypto/modes/siv128.c
+++ b/crypto/modes/siv128.c
@@ -202,9 +202,12 @@ int ossl_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen,
|| !EVP_MAC_final(mac_ctx, ctx->d.byte, &out_len,
sizeof(ctx->d.byte))) {
EVP_CIPHER_CTX_free(ctx->cipher_ctx);
+ ctx->cipher_ctx = NULL;
EVP_MAC_CTX_free(ctx->mac_ctx_init);
+ ctx->mac_ctx_init = NULL;
EVP_MAC_CTX_free(mac_ctx);
EVP_MAC_free(ctx->mac);
+ ctx->mac = NULL;
return 0;
}
EVP_MAC_CTX_free(mac_ctx);