summaryrefslogtreecommitdiffstats
path: root/crypto/context.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-04-26 11:35:17 +0100
committerMatt Caswell <matt@openssl.org>2021-05-11 14:56:55 +0100
commita16d21744df686a7c005d1f129915d9083476e14 (patch)
tree1ea4d25a974b2f7cfcaafe65a03f9557b8ddc780 /crypto/context.c
parentd07af736de592602f2831f8559d0302cb116e190 (diff)
Add the ability for ex_data to have a priority
Where an object has multiple ex_data associated with it, then we free that ex_data in order of priority (high priority first). Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14991)
Diffstat (limited to 'crypto/context.c')
-rw-r--r--crypto/context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/context.c b/crypto/context.c
index 4ea949970a..b21fdf077d 100644
--- a/crypto/context.c
+++ b/crypto/context.c
@@ -305,7 +305,8 @@ static int ossl_lib_ctx_init_index(OSSL_LIB_CTX *ctx, int static_index,
idx = ossl_crypto_get_ex_new_index_ex(ctx, CRYPTO_EX_INDEX_OSSL_LIB_CTX, 0,
(void *)meth,
ossl_lib_ctx_generic_new,
- NULL, ossl_lib_ctx_generic_free);
+ NULL, ossl_lib_ctx_generic_free,
+ meth->priority);
if (idx < 0)
return 0;