eckey_priv_encode(): Call ASN1_STRING_free() only on an ASN1_STRING
authorTomas Mraz <tomas@openssl.org>
Mon, 10 Oct 2022 06:59:23 +0000 (08:59 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 11 Oct 2022 14:46:50 +0000 (16:46 +0200)
commit8b5424eae5577809264e73a229fcc4c384611fae
tree1b5145ef1a8a47d77516f461433b4dd33e27e34e
parent681c461910b1b72af263ec735bac1310b2fadcd0
eckey_priv_encode(): Call ASN1_STRING_free() only on an ASN1_STRING

Also ASN1_OBJECT_free() never needs to be called on objects returned
from OBJ_nid2obj().

Fixes #19138

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19367)
crypto/ec/ec_ameth.c