summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-04-07 17:21:40 +0000
committertb <>2021-04-07 17:21:40 +0000
commit6527abaa41446de00a9a123155b06733561db20d (patch)
tree86893ab3c4cfbb96b69f6de0b82603824919b7d1
parent6d06ac369e451729f7eadaba6755fcf1534cf634 (diff)
downloadopenbsd-6527abaa41446de00a9a123155b06733561db20d.tar.gz
openbsd-6527abaa41446de00a9a123155b06733561db20d.tar.bz2
openbsd-6527abaa41446de00a9a123155b06733561db20d.zip
Use ERR_print_error_fp() to avoid leaking a BIO in fatal()
-rw-r--r--src/regress/lib/libcrypto/pkcs7/pkcs7test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/pkcs7/pkcs7test.c b/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
index 5a72586ca8..28e0f67aee 100644
--- a/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
+++ b/src/regress/lib/libcrypto/pkcs7/pkcs7test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs7test.c,v 1.4 2018/11/10 02:23:28 jsing Exp $ */ 1/* $OpenBSD: pkcs7test.c,v 1.5 2021/04/07 17:21:40 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -103,7 +103,7 @@ static void
103fatal(const char *msg) 103fatal(const char *msg)
104{ 104{
105 warnx("%s", msg); 105 warnx("%s", msg);
106 ERR_print_errors(BIO_new_fd(STDERR_FILENO, 0)); 106 ERR_print_errors_fp(stderr);
107 exit(1); 107 exit(1);
108} 108}
109 109