From: tb Date: Thu, 28 Sep 2023 14:54:39 +0000 (+0000) Subject: Don't leak ctx on failure X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ed380d87092a216d955af01d24eb6031a8aac6f5;p=openbsd Don't leak ctx on failure --- 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; }