summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authortb <>2023-04-28 18:27:49 +0000
committertb <>2023-04-28 18:27:49 +0000
commit9f148eaae6986307da359541e85515c2fc9e1366 (patch)
tree39e5fd06c62c22be89e9d95a0ca57a80fe37753c /src/regress/lib
parenta2eb0bbb9a554a5a5a9f7dea7b6d752c0e77a086 (diff)
downloadopenbsd-9f148eaae6986307da359541e85515c2fc9e1366.tar.gz
openbsd-9f148eaae6986307da359541e85515c2fc9e1366.tar.bz2
openbsd-9f148eaae6986307da359541e85515c2fc9e1366.zip
Fix leaks reported by ASAN
debugged with job
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libcrypto/x509/x509_asn1.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/x509/x509_asn1.c b/src/regress/lib/libcrypto/x509/x509_asn1.c
index 30b0607079..d6b4e1c619 100644
--- a/src/regress/lib/libcrypto/x509/x509_asn1.c
+++ b/src/regress/lib/libcrypto/x509/x509_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_asn1.c,v 1.11 2023/04/28 15:12:51 job Exp $ */ 1/* $OpenBSD: x509_asn1.c,v 1.12 2023/04/28 18:27:49 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Job Snijders <job@openbsd.org> 3 * Copyright (c) 2023 Job Snijders <job@openbsd.org>
4 * 4 *
@@ -118,8 +118,6 @@ x509_set_time(int (*f)(X509 *, const ASN1_TIME *), X509 **x, int t)
118{ 118{
119 ASN1_TIME *at; 119 ASN1_TIME *at;
120 120
121 if ((at = ASN1_TIME_new()) == NULL)
122 err(1, NULL);
123 if ((at = X509_gmtime_adj(NULL, t)) == NULL) 121 if ((at = X509_gmtime_adj(NULL, t)) == NULL)
124 errx(1, "X509_gmtime_adj"); 122 errx(1, "X509_gmtime_adj");
125 if (!f(*x, at)) 123 if (!f(*x, at))
@@ -194,8 +192,6 @@ x509_crl_set_time(int (*f)(X509_CRL *, const ASN1_TIME *), X509_CRL **xc, int t)
194{ 192{
195 ASN1_TIME *at; 193 ASN1_TIME *at;
196 194
197 if ((at = ASN1_TIME_new()) == NULL)
198 err(1, NULL);
199 if ((at = X509_gmtime_adj(NULL, t)) == NULL) 195 if ((at = X509_gmtime_adj(NULL, t)) == NULL)
200 errx(1, "X509_gmtime_adj"); 196 errx(1, "X509_gmtime_adj");
201 if (!f(*xc, at)) 197 if (!f(*xc, at))