Skip to content

Commit

Permalink
Fix lock leak in evp_keymgmt_util_export_to_provider()
Browse files Browse the repository at this point in the history
Fixes openssl#16847

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from openssl#16849)
  • Loading branch information
levitte committed Oct 16, 2021
1 parent d5d95da commit fb0f65f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/evp/keymgmt_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ void *evp_keymgmt_util_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt)

/* Add the new export to the operation cache */
if (!evp_keymgmt_util_cache_keydata(pk, keymgmt, import_data.keydata)) {
CRYPTO_THREAD_unlock(pk->lock);
evp_keymgmt_freedata(keymgmt, import_data.keydata);
return NULL;
}
Expand Down

0 comments on commit fb0f65f

Please sign in to comment.