Plug leak in c2i_ASN1_OBJECT
authortb <tb@openbsd.org>
Sat, 1 May 2021 13:16:30 +0000 (13:16 +0000)
committertb <tb@openbsd.org>
Sat, 1 May 2021 13:16:30 +0000 (13:16 +0000)
commit12b0d2cbf6d2589372ffa66c3bf3055bf3f30f2f
tree063115a7b9383d810999f0034e71f673da482e1f
parente81eb8669278e4a65ad2ec8e6c37fc13de1eb9b7
Plug leak in c2i_ASN1_OBJECT

When using the object reuse facility of c2i_ASN1_OBJECT, the dynamically
allocated strings a may contain are set to NULL, so we must free them
beforehand. Also clear the flag, because that's what OpenSSL chose to do.

From Richard Levitte OpenSSL 1.1.1 65b88a75921533ada8b465bc8d5c0817ad927947

ok inoguchi
lib/libcrypto/asn1/a_object.c