summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-08-26 07:04:53 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-03 17:48:32 +0200
commit7a3068109568cefdb0d63be1d0c83251c621156e (patch)
treeed881ed3e0fef7881104ccda739c6a198e1414ad /crypto/store
parenta10847c427744fb7e7d29953dee130a52251c027 (diff)
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)
Diffstat (limited to 'crypto/store')
-rw-r--r--crypto/store/store_lib.c1
1 files changed, 1 insertions, 0 deletions
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;
}