diff --git a/src/mumble/Cert.cpp b/src/mumble/Cert.cpp index 9daabeaa87..6a538355c4 100644 --- a/src/mumble/Cert.cpp +++ b/src/mumble/Cert.cpp @@ -436,8 +436,7 @@ Settings::KeyPair CertWizard::importCert(QByteArray data, const QString &pw) { Settings::KeyPair kp; int ret = 0; - mem = BIO_new_mem_buf(data.data(), static_cast< int >(data.size())); - Q_UNUSED(BIO_set_close(mem, BIO_NOCLOSE)); + mem = BIO_new_mem_buf(data.data(), static_cast< int >(data.size())); pkcs = d2i_PKCS12_bio(mem, nullptr); if (pkcs) { ret = PKCS12_parse(pkcs, nullptr, &pkey, &x509, &certs); diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp index 71ec363dfa..9c38797c23 100644 --- a/src/murmur/Cert.cpp +++ b/src/murmur/Cert.cpp @@ -32,13 +32,11 @@ bool Server::isKeyForCert(const QSslKey &key, const QSslCertificate &cert) { EVP_PKEY *pkey = nullptr; BIO *mem = nullptr; - mem = BIO_new_mem_buf(qbaKey.data(), static_cast< int >(qbaKey.size())); - Q_UNUSED(BIO_set_close(mem, BIO_NOCLOSE)); + mem = BIO_new_mem_buf(qbaKey.data(), static_cast< int >(qbaKey.size())); 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)); + mem = BIO_new_mem_buf(qbaCert.data(), static_cast< int >(qbaCert.size())); x509 = d2i_X509_bio(mem, nullptr); BIO_free(mem); mem = nullptr;