From: tb Date: Fri, 28 Apr 2023 18:27:49 +0000 (+0000) Subject: Fix leaks reported by ASAN X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e17ab34e70f99ea22e6addb24fbf59090936ba4b;p=openbsd Fix leaks reported by ASAN debugged with job --- 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))