From e4b8c6e7a52a605ce661337bb64560dbccb7b911 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 7 Apr 2021 17:21:40 +0000 Subject: [PATCH] Use ERR_print_error_fp() to avoid leaking a BIO in fatal() --- regress/lib/libcrypto/pkcs7/pkcs7test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/lib/libcrypto/pkcs7/pkcs7test.c b/regress/lib/libcrypto/pkcs7/pkcs7test.c index 5a72586ca86..28e0f67aeef 100644 --- a/regress/lib/libcrypto/pkcs7/pkcs7test.c +++ b/regress/lib/libcrypto/pkcs7/pkcs7test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs7test.c,v 1.4 2018/11/10 02:23:28 jsing Exp $ */ +/* $OpenBSD: pkcs7test.c,v 1.5 2021/04/07 17:21:40 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -103,7 +103,7 @@ static void fatal(const char *msg) { warnx("%s", msg); - ERR_print_errors(BIO_new_fd(STDERR_FILENO, 0)); + ERR_print_errors_fp(stderr); exit(1); } -- 2.20.1