]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/provider_conf.c: Fix possible memory leak
authorJiashengJiang <jiasheng@purdue.edu>
Mon, 5 May 2025 01:41:39 +0000 (21:41 -0400)
committerTomas Mraz <tomas@openssl.org>
Wed, 7 May 2025 09:51:48 +0000 (11:51 +0200)
commit8f32d906f0580548f0930da4f2e2ccb9831d29b6
treeba84f98471b7f2144aee8e0575e2a6daf0f7f0d4
parent87047f45a0180e6185de58a9e8de89c0646c9761
crypto/provider_conf.c: Fix possible memory leak

Assign the return value of ossl_provider_info_add_to_store to added instead of
setting it directly to 1, in order to avoid a memory leak caused by entry not
being freed if ossl_provider_info_add_to_store() fails.

Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27472)

(cherry picked from commit 9884f1dc11675a5c4613339cfb92903c6ba6103f)
crypto/provider_conf.c