From: Christophe Jaillet Date: Fri, 7 Jan 2022 17:30:48 +0000 (+0000) Subject: Follow-up to r1896361. X-Git-Tag: 2.5.0-alpha2-ci-test-only~593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d9aee916aac409987ccd8202068382be1bdfe7;p=thirdparty%2Fapache%2Fhttpd.git Follow-up to r1896361. Use a cleaner solution. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896817 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/mod_ssl_ct.c b/modules/ssl/mod_ssl_ct.c index e6fd91583a7..f583da5f184 100644 --- a/modules/ssl/mod_ssl_ct.c +++ b/modules/ssl/mod_ssl_ct.c @@ -2966,14 +2966,13 @@ static const char *ct_static_scts(cmd_parms *cmd, void *x, const char *cert_fn, } cert = PEM_read_X509(pemfile, NULL, NULL, NULL); + fclose(pemfile); + if (!cert) { - fclose(pemfile); return apr_psprintf(p, "could not read certificate from file %s", cert_fn); } - fclose(pemfile); - fingerprint = get_cert_fingerprint(p, cert); X509_free(cert);