From: Christophe Jaillet Date: Fri, 24 Dec 2021 13:49:35 +0000 (+0000) Subject: Close a file handle in case of error in ct_static_scts() X-Git-Tag: 2.5.0-alpha2-ci-test-only~617 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=442b4b167f19e13df918402a7af28fe4a50c2730;p=thirdparty%2Fapache%2Fhttpd.git Close a file handle in case of error in ct_static_scts() PR 65760 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896361 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/mod_ssl_ct.c b/modules/ssl/mod_ssl_ct.c index 535ea4449e7..e6fd91583a7 100644 --- a/modules/ssl/mod_ssl_ct.c +++ b/modules/ssl/mod_ssl_ct.c @@ -2967,6 +2967,7 @@ static const char *ct_static_scts(cmd_parms *cmd, void *x, const char *cert_fn, cert = PEM_read_X509(pemfile, NULL, NULL, NULL); if (!cert) { + fclose(pemfile); return apr_psprintf(p, "could not read certificate from file %s", cert_fn); }