From: tb Date: Thu, 6 Jul 2023 15:11:21 +0000 (+0000) Subject: bn_print: remove unused bio, plug leak X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=69421fdc9e04bb6db1ac2990a614d7a4e7ec3dd0;p=openbsd bn_print: remove unused bio, plug leak --- diff --git a/regress/lib/libcrypto/bn/bn_print.c b/regress/lib/libcrypto/bn/bn_print.c index a19fa84cbc4..ce3d50d2616 100644 --- a/regress/lib/libcrypto/bn/bn_print.c +++ b/regress/lib/libcrypto/bn/bn_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_print.c,v 1.1 2023/07/06 15:08:54 tb Exp $ */ +/* $OpenBSD: bn_print.c,v 1.2 2023/07/06 15:11:21 tb Exp $ */ /* * Copyright (c) 2023 Theo Buehler @@ -181,13 +181,9 @@ main(void) { const struct print_test *test; size_t testcase = 0; - BIO *bio; BIGNUM *bn; int failed = 0; - if ((bio = BIO_new_fp(stdout, BIO_NOCLOSE)) == NULL) - errx(1, "BIO_new_fp"); - /* zero */ if ((bn = BN_new()) == NULL) errx(1, "BN_new"); @@ -276,5 +272,7 @@ main(void) failed |= 1; } + BN_free(bn); + return failed; }