[Libreoffice-commits] core.git: package/source
Caolán McNamara
caolanm at redhat.com
Sat Dec 2 20:17:55 UTC 2017
package/source/zippackage/ZipPackage.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 8d0a90825aa01c95d9dacecad83cfc65d3a7c57c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Dec 2 14:55:56 2017 +0000
ofz#4502 Direct-leak
Change-Id: I1323aa7033c68802384c9b984b52a6c6f1156094
Reviewed-on: https://gerrit.libreoffice.org/45714
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 27e578d51bda..021ad2ad6792 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -530,11 +530,15 @@ void ZipPackage::getZipFileContents()
{
nStreamIndex++;
sTemp = rName.copy( nStreamIndex );
- ZipPackageStream *pPkgStream = new ZipPackageStream(*this, m_xContext, m_nFormat, m_bAllowRemoveOnInsert);
- pPkgStream->SetPackageMember( true );
- pPkgStream->setZipEntryOnLoading( rEntry );
- pPkgStream->setName( sTemp );
- pPkgStream->doSetParent( pCurrent );
+
+ if (!pCurrent->hasByName(sTemp))
+ {
+ ZipPackageStream *pPkgStream = new ZipPackageStream(*this, m_xContext, m_nFormat, m_bAllowRemoveOnInsert);
+ pPkgStream->SetPackageMember(true);
+ pPkgStream->setZipEntryOnLoading(rEntry);
+ pPkgStream->setName(sTemp);
+ pPkgStream->doSetParent(pCurrent);
+ }
}
}
More information about the Libreoffice-commits
mailing list