diff --git a/libratbox/src/openssl.c b/libratbox/src/openssl.c index 7de5d1c..d954011 100644 --- a/libratbox/src/openssl.c +++ b/libratbox/src/openssl.c @@ -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) { memcpy(certfp, cert->sha1_hash, RB_SSL_CERTFP_LEN); + X509_free(cert); return 1; } X509_free(cert);