libratbox/openssl: Fix possible memory leak with SSL dertificate fingerprints

This commit is contained in:
Quora Dodrill 2013-08-14 09:49:04 -07:00
parent e717686ac1
commit 6ecd598ec0

View file

@ -644,6 +644,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);