From e17ab34e70f99ea22e6addb24fbf59090936ba4b Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 28 Apr 2023 18:27:49 +0000 Subject: [PATCH] Fix leaks reported by ASAN debugged with job --- regress/lib/libcrypto/x509/x509_asn1.c | 6 +----- 1 file changed, 1 insertion(+), 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 * @@ -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)) -- 2.20.1