Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18494)
*saved_indent = (i < 0 ? 0 : i);
if (BIO_set_indent(*out, indent) <= 0) {
- if ((*out = BIO_push(BIO_new(BIO_f_prefix()), *out)) == NULL)
+ BIO *prefbio = BIO_new(BIO_f_prefix());
+
+ if (prefbio == NULL)
return 0;
+ *out = BIO_push(prefbio, *out);
*pop_f_prefix = 1;
}
if (BIO_set_indent(*out, indent) <= 0) {
return ret;
if (!evp_pkey_copy_downgraded(&tmp_copy, pk))
- return NULL;
+ goto err;
if (!CRYPTO_THREAD_write_lock(pk->lock))
goto err;