summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 3aa9cab78a51..990ea86a9bbb 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -477,7 +477,10 @@ Reference< XCertificate > SecurityEnvironment_NssImpl::createCertificateFromAsci
xmlSecSize certSize;
int nRet = xmlSecBase64Decode_ex( chCert, reinterpret_cast<xmlSecByte*>(chCert), xmlStrlen( chCert ), &certSize ) ;
if (nRet < 0 || certSize == 0)
+ {
+ xmlFree(chCert);
return nullptr;
+ }
Sequence< sal_Int8 > rawCert(comphelper::arrayToSequence<sal_Int8>(chCert, certSize)) ;