]> git.ipfire.org Git - thirdparty/openssl.git/commit
Don't call ossl_provider_free() without first setting refcnt
authorMatt Caswell <matt@openssl.org>
Fri, 27 May 2022 10:07:37 +0000 (11:07 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 2 Jun 2022 09:31:12 +0000 (10:31 +0100)
commitc4ed6f6f0ee700e0473def049659061dd52fd3fc
tree9ca85011d9863dd0d38a08584fa211330fe8f4ef
parentb4be10dfcd370960cecfda9773e1bfcc568a7390
Don't call ossl_provider_free() without first setting refcnt

The function ossl_provider_free() decrements the refcnt of the
provider and frees it if it has reached 0. This only works if the
refcnt has already been initialised. We must only call
ossl_provider_free() after this initialisation - otherwise it will fail
to free the provider correctly.

Addresses the issue mentioned here:
https://github.com/openssl/openssl/pull/18355#issuecomment-1138741857

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18417)
crypto/provider_core.c