[Libreoffice-commits] core.git: vcl/source
Takeshi Abe
tabe at fixedpoint.jp
Thu Jan 19 10:46:32 UTC 2017
vcl/source/gdi/pdfwriter_impl.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 9aeccd9ac7b71bfa225e4a2c4dd6692a4659da71
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Jan 19 13:24:19 2017 +0900
vcl: Fix a small chance of memleaks
Change-Id: I4fe286486f9cad57c4220d10367442a51f077f00
Reviewed-on: https://gerrit.libreoffice.org/33294
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index e79752a..a4f2fe0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6794,6 +6794,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!aCertHashContext.get())
{
SAL_WARN("vcl.pdfwriter", "HASH_Create() failed");
+ free(pass);
return false;
}
HASH_Begin(aCertHashContext.get());
@@ -6818,6 +6819,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!pEncodedCertificate)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem() failed");
+ free(pass);
return false;
}
@@ -6842,6 +6844,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_SEC_StringToOID(&aOidData.oid, "1.2.840.113549.1.9.16.2.47", 0) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "my_SEC_StringToOID() failed");
+ free(pass);
return false;
}
aOidData.offset = SEC_OID_UNKNOWN;
@@ -6855,6 +6858,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_NSS_CMSSignerInfo_AddAuthAttr(cms_signer, &aAttribute) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "my_NSS_CMSSignerInfo_AddAuthAttr() failed");
+ free(pass);
return false;
}
More information about the Libreoffice-commits
mailing list