diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-18 21:33:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-18 21:33:47 +0000 |
commit | 16c9933666a9328a8bc59175248a440d26b3242a (patch) | |
tree | 323b04e55f6389cbd1a6b00a9533c1a5b77ae4dc /xmlsecurity | |
parent | 86255f68719dce3f2ff07c54270d3e08fbd852c9 (diff) |
convert to std::vector
Change-Id: I77ac7701ccb35aa32152d85a20fc59ed0bd942cf
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx index a4ca2a6d28c4..5e614631e944 100644 --- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx @@ -80,7 +80,7 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl: CERTGeneralName* current = nameList; int size = GetNamesLength(nameList); - CertAltNameEntry* arrCertAltNameEntry = new CertAltNameEntry[size]; + std::vector<CertAltNameEntry> arrCertAltNameEntry(size); for(int i = 0; i < size ; i++){ switch (current->type) { case certOtherName: { @@ -146,13 +146,9 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl: current = CERT_GetNextGeneralName(current); } - m_Entries = ::comphelper::arrayToSequence< css::security::CertAltNameEntry >(arrCertAltNameEntry, size); - - delete [] arrCertAltNameEntry; + m_Entries = ::comphelper::containerToSequence<css::security::CertAltNameEntry>(arrCertAltNameEntry); PORT_FreeArena(arena, PR_FALSE); - - } return m_Entries; |