Fix a mem leak in evp_pkey_export_to_provider
authorK1 <dongbeiouba@gmail.com>
Wed, 8 Jun 2022 08:41:16 +0000 (16:41 +0800)
committerTodd Short <todd.short@me.com>
Wed, 15 Jun 2022 14:53:04 +0000 (10:53 -0400)
commit115eb945acd9a27bf81c6c8923f43768f9e487a8
tree7a42d1643286c14c70bd4a244dc5a9256612abce
parent01fc9b6bce82f0534d6673659a0e59a71f57ee82
Fix a mem leak in evp_pkey_export_to_provider

If keymgmt is NULL, tmp_keymgmt is allocated and will not be freed.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/18499)
crypto/evp/p_lib.c
test/keymgmt_internal_test.c
test/recipes/02-test_internal_keymgmt.t