Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.1
-
None
-
8d7edf18ebd4bb4cf110000afb1b5a8b1f3887a4
Description
In qtbase/src/network/ssl/qsslcertificate_openssl.cpp you have
QMultiMap<QSsl::AlternativeNameEntryType, QString> QSslCertificate::subjectAlternativeNames() const { STACK_OF(GENERAL_NAME) *altNames = (STACK_OF(GENERAL_NAME)*)q_X509_get_ext_d2i(d->x509, NID_subject_alt_name, 0, 0); if (altNames) { for (int i = 0; i < q_sk_GENERAL_NAME_num(altNames); ++i) { const GENERAL_NAME *genName = q_sk_GENERAL_NAME_value(altNames, i); ... } q_sk_pop_free((STACK*)altNames, reinterpret_cast<void(*)(void*)>(q_sk_free)); } return result; }
It seems you have to do q_sk_pop_free in such way:
sk_pop_free((STACK *)altNames, reinterpret_cast<void (*)(void *)>(GENERAL_NAME_free));
Attachments
Issue Links
- is duplicated by
-
QTBUG-68268 Memory Leak in QSslCertificate::subjectAlternativeNames()
- Closed