mirror of
https://github.com/deskflow/deskflow.git
synced 2026-07-01 21:02:39 +08:00
refactor: free SecureSocket cert after use
This commit is contained in:
parent
024436d82f
commit
dbc7aebfbc
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user