libratbox/openssl: Fix possible memory leak of certificate fingerprints

This commit is contained in:
Sam Dodrill 2013-09-15 21:19:24 -07:00
parent 1d878cec57
commit 7f45233243
1 changed files with 1 additions and 0 deletions

View File

@ -639,6 +639,7 @@ rb_get_ssl_certfp(rb_fde_t *F, uint8_t certfp[RB_SSL_CERTFP_LEN])
res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT) res == X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT)
{ {
memcpy(certfp, cert->sha1_hash, RB_SSL_CERTFP_LEN); memcpy(certfp, cert->sha1_hash, RB_SSL_CERTFP_LEN);
X509_free(cert);
return 1; return 1;
} }
X509_free(cert); X509_free(cert);