]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix fp leak on cert load in rlm_cipher
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 15 Mar 2018 16:34:25 +0000 (16:34 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 15 Mar 2018 16:35:51 +0000 (16:35 +0000)
src/modules/rlm_cipher/rlm_cipher.c

index 155b8373e863edb78919688b62673906931153da..ec60e4c33dd55e7e81f4aac6f68305fc00cbe0f0 100644 (file)
@@ -410,6 +410,8 @@ static int cipher_rsa_certificate_file_load(UNUSED TALLOC_CTX *ctx, void *out, C
         *      Load the PEM encoded X509 certificate
         */
        cert = PEM_read_X509(fp, NULL, NULL, NULL);
+       fclose(fp);
+
        if (!cert) {
                tls_strerror_printf(NULL);
                cf_log_perr(ci, "Error loading certificate file \"%s\"", filename);