Fix two leaks in BIO_dup_chain()
authortb <tb@openbsd.org>
Mon, 7 Aug 2023 10:58:56 +0000 (10:58 +0000)
committertb <tb@openbsd.org>
Mon, 7 Aug 2023 10:58:56 +0000 (10:58 +0000)
commitd7402cb6395965f11cb8ffaffcd9735514cc5ff3
treefd9d27d57de1e631b5e8bc57a3aa66c1f4499b16
parent733f90f0eada10f437194acfb4b64ed6008ca599
Fix two leaks in BIO_dup_chain()

If CRYPTO_dup_ex_data() fails, the new_bio is leaked. If an error occurs
after the first iteration, all members of the new chain except the head
are leaked.

ok jsing
lib/libcrypto/bio/bio_lib.c