]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow-up to r1896361.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 7 Jan 2022 17:30:48 +0000 (17:30 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 7 Jan 2022 17:30:48 +0000 (17:30 +0000)
Use a cleaner solution.

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

modules/ssl/mod_ssl_ct.c

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