STORE: Fix potential memory leak

When closing an OSSL_STORE_CTX, also clear the passphrase data.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12587)
This commit is contained in:
Richard Levitte 2020-08-26 07:04:53 +02:00
parent a10847c427
commit 7a30681095

View File

@ -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;
}