Fix leak during SSL handshake for SPIFFE authentication

Resources allocated by 'SSL_get_peer_certificate' and
'X509_get_ext_d2i' were being leaked during the SSL handshake.
pull/3866/head
--global 4 years ago committed by Javier Jaramago Fernández
parent 52ea5abfa9
commit 741b6f2cf0

@ -198,6 +198,9 @@ enum sslstatus MySQL_Data_Stream::do_ssl_handshake() {
}
}
}
sk_GENERAL_NAME_pop_free(alt_names, GENERAL_NAME_free);
X509_free(cert);
} else {
// we currently disable this annoying error
// in future we can configure this as per user level, specifying if the certificate is mandatory or not

Loading…
Cancel
Save