On 12/24/21 2:49 PM, jaillet...@apache.org wrote:
> Author: jailletc36
> Date: Fri Dec 24 13:49:35 2021
> New Revision: 1896361
>
> URL: http://svn.apache.org/viewvc?rev=1896361&view=rev
> Log:
> Close a file handle in case of error in ct_static_scts()
>
> PR 65760 <ryancaicse gmail.com>
>
> Modified:
> httpd/httpd/trunk/modules/ssl/mod_ssl_ct.c
>
> Modified: httpd/httpd/trunk/modules/ssl/mod_ssl_ct.c
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/mod_ssl_ct.c?rev=1896361&r1=1896360&r2=1896361&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/ssl/mod_ssl_ct.c (original)
> +++ httpd/httpd/trunk/modules/ssl/mod_ssl_ct.c Fri Dec 24 13:49:35 2021
> @@ -2967,6 +2967,7 @@ static const char *ct_static_scts(cmd_pa
>
> cert = PEM_read_X509(pemfile, NULL, NULL, NULL);
> if (!cert) {
> + fclose(pemfile);
Couldn't we just move that before the if and remove the previously existing
call?
Regards
RĂ¼diger