From 7a3068109568cefdb0d63be1d0c83251c621156e Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 26 Aug 2020 07:04:53 +0200 Subject: [PATCH] STORE: Fix potential memory leak When closing an OSSL_STORE_CTX, also clear the passphrase data. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/12587) --- crypto/store/store_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index 978cb75af8d..89efe691da0 100644 --- a/crypto/store/store_lib.c +++ b/crypto/store/store_lib.c @@ -473,6 +473,7 @@ static int ossl_store_close_it(OSSL_STORE_CTX *ctx) sk_OSSL_STORE_INFO_pop_free(ctx->cached_info, OSSL_STORE_INFO_free); OSSL_STORE_LOADER_free(ctx->fetched_loader); OPENSSL_free(ctx->properties); + ossl_pw_clear_passphrase_data(&ctx->pwdata); return ret; } -- 2.47.3