From: Richard Levitte Date: Wed, 26 Aug 2020 05:04:53 +0000 (+0200) Subject: STORE: Fix potential memory leak X-Git-Tag: openssl-3.0.0-alpha7~399 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a3068109568cefdb0d63be1d0c83251c621156e;p=thirdparty%2Fopenssl.git 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) --- diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c index 978cb75af8..89efe691da 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; }