sw/source/filter/ww8/docxexport.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit bedce5f2b383c38b8fe051e4e63b76e116c5ffb4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Apr 2 09:25:02 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Apr 2 12:07:59 2020 +0200 cid#1418980 Resource leak Change-Id: I3a09b3165503bacbd2bab394eda9adc793f0bff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index f9af8d2937cf..035f50cbeaac 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1210,7 +1210,7 @@ void DocxExport::WriteSettings() if (rAttributeList.hasElements()) { - sax_fastparser::FastAttributeList* pAttributeList = sax_fastparser::FastSerializerHelper::createAttrList(); + rtl::Reference<sax_fastparser::FastAttributeList> xAttributeList = sax_fastparser::FastSerializerHelper::createAttrList(); bool bIsProtectionTrackChanges = false; // if grabbag protection is not enforced, allow Writer protection to override bool bEnforced = false; @@ -1234,7 +1234,7 @@ void DocxExport::WriteSettings() if (sal_Int32 nToken = DocxStringGetToken(aTokens, rAttribute.Name)) { OUString sValue = rAttribute.Value.get<OUString>(); - pAttributeList->add(FSNS(XML_w, nToken), sValue.toUtf8()); + xAttributeList->add(FSNS(XML_w, nToken), sValue.toUtf8()); if ( nToken == XML_edit && sValue == "trackedChanges" ) bIsProtectionTrackChanges = true; else if ( nToken == XML_edit && sValue == "readOnly" ) @@ -1264,8 +1264,8 @@ void DocxExport::WriteSettings() if ( bUseGrabBagProtection ) { - sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList); - pFS->singleElementNS(XML_w, XML_documentProtection, xAttributeList); + sax_fastparser::XFastAttributeListRef xFastAttributeList(xAttributeList.get()); + pFS->singleElementNS(XML_w, XML_documentProtection, xFastAttributeList); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits