summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-04-28 18:27:50 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-04-28 18:27:50 +0000
commit8b203e2fe75000fba88fd6dd1bb675f7769b781e (patch)
tree46e0ce7597fe235b602bb621229f703997fe1d25
parent816641416dca5179e74333188a4d708808ccd653 (diff)
Fix leaks reported by ASAN
debugged with job
-rw-r--r--regress/lib/libcrypto/x509/x509_asn1.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/regress/lib/libcrypto/x509/x509_asn1.c b/regress/lib/libcrypto/x509/x509_asn1.c
index 30b0607079d..d6b4e1c6198 100644
--- a/regress/lib/libcrypto/x509/x509_asn1.c
+++ b/regress/lib/libcrypto/x509/x509_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_asn1.c,v 1.11 2023/04/28 15:12:51 job Exp $ */
+/* $OpenBSD: x509_asn1.c,v 1.12 2023/04/28 18:27:49 tb Exp $ */
/*
* Copyright (c) 2023 Job Snijders <job@openbsd.org>
*
@@ -118,8 +118,6 @@ x509_set_time(int (*f)(X509 *, const ASN1_TIME *), X509 **x, int t)
{
ASN1_TIME *at;
- if ((at = ASN1_TIME_new()) == NULL)
- err(1, NULL);
if ((at = X509_gmtime_adj(NULL, t)) == NULL)
errx(1, "X509_gmtime_adj");
if (!f(*x, at))
@@ -194,8 +192,6 @@ x509_crl_set_time(int (*f)(X509_CRL *, const ASN1_TIME *), X509_CRL **xc, int t)
{
ASN1_TIME *at;
- if ((at = ASN1_TIME_new()) == NULL)
- err(1, NULL);
if ((at = X509_gmtime_adj(NULL, t)) == NULL)
errx(1, "X509_gmtime_adj");
if (!f(*xc, at))