refactor: free SecureSocket cert after use

This commit is contained in:
sithlord48
2025-06-18 09:19:52 -04:00
committed by Nick Bolton
parent 024436d82f
commit dbc7aebfbc

View File

@ -639,6 +639,9 @@ bool SecureSocket::verifyCertFingerprint(const QString &FingerprintDatabasePath)
const auto cert = SSL_get_peer_certificate(m_ssl->m_ssl);
const auto sha256 = deskflow::sslCertFingerprint(cert, Fingerprint::Type::SHA256);
if (cert)
X509_free(cert);
if (!sha256.isValid())
return false;