x509_vfy: fix mem leaks in chain_build() on malloc error Coverify CID 1473068
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 15 Feb 2021 09:24:58 +0000 (10:24 +0100)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 17 Feb 2021 16:37:13 +0000 (17:37 +0100)
commitadc11e1b9cf12df3c67de165a2b42ac72266cbca
tree6c8edbec52734aec77f9ab38a8aa75150c0bfbd7
parentb51bed05c2ab54a1933b5c18862e68cd4540278c
x509_vfy: fix mem leaks in chain_build() on malloc error Coverify CID 1473068

Fixes: Variable "sk_untrusted" going out of scope leaks the storage it points to.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14187)
crypto/x509/x509_vfy.c