Skip to content

Commit

Permalink
FIX(server): Fix memory leak in Server::isKeyForCert mumble-voip#6603
Browse files Browse the repository at this point in the history
BIO_set_close with BIO_NOCLOSE argument leads to memory leaks here
  • Loading branch information
botanegg committed Oct 11, 2024
1 parent a428773 commit 8ce2972
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/murmur/Cert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ bool Server::isKeyForCert(const QSslKey &key, const QSslCertificate &cert) {
BIO *mem = nullptr;

mem = BIO_new_mem_buf(qbaKey.data(), static_cast< int >(qbaKey.size()));
Q_UNUSED(BIO_set_close(mem, BIO_NOCLOSE));
pkey = d2i_PrivateKey_bio(mem, nullptr);
BIO_free(mem);

mem = BIO_new_mem_buf(qbaCert.data(), static_cast< int >(qbaCert.size()));
Q_UNUSED(BIO_set_close(mem, BIO_NOCLOSE));
x509 = d2i_X509_bio(mem, nullptr);
BIO_free(mem);
mem = nullptr;
Expand Down

0 comments on commit 8ce2972

Please sign in to comment.