]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Close a file handle in case of error in ct_static_scts()
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 24 Dec 2021 13:49:35 +0000 (13:49 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 24 Dec 2021 13:49:35 +0000 (13:49 +0000)
PR 65760 <ryancaicse gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896361 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/mod_ssl_ct.c

index 535ea4449e73df7a4cdb684d5b54e5d5d6e0224c..e6fd91583a7c42ace891a965e14474737402b420 100644 (file)
@@ -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);
     }