Skip to content

Commit

Permalink
Fix fp leak on cert load in rlm_cipher
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 15, 2018
1 parent 91e1db4 commit d03dabe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/rlm_cipher/rlm_cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d03dabe

Please sign in to comment.