From ed380d87092a216d955af01d24eb6031a8aac6f5 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 28 Sep 2023 14:54:39 +0000 Subject: [PATCH] Don't leak ctx on failure --- regress/lib/libcrypto/evp/evp_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/regress/lib/libcrypto/evp/evp_test.c b/regress/lib/libcrypto/evp/evp_test.c index e00ed017594..0b1f54f6af0 100644 --- a/regress/lib/libcrypto/evp/evp_test.c +++ b/regress/lib/libcrypto/evp/evp_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_test.c,v 1.5 2023/09/28 11:39:35 tb Exp $ */ +/* $OpenBSD: evp_test.c,v 1.6 2023/09/28 14:54:39 tb Exp $ */ /* * Copyright (c) 2022 Joel Sing * @@ -382,11 +382,10 @@ evp_pkey_iv_len_testcase(const struct evp_iv_len_test *test) } done: - EVP_CIPHER_CTX_free(ctx); - failure = 0; failure: + EVP_CIPHER_CTX_free(ctx); return failure; } -- 2.20.1