diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-04-09 21:05:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-04-09 21:10:37 +0100 |
commit | 7b9a5e8124328da9d81aed58cf944c91560a7c07 (patch) | |
tree | 20c2b969b4f5412217a8fe744753e64dcb8cf0a2 /sw | |
parent | 3ac0778c0a2b2f693a1029b7b05c1be4f71944a9 (diff) |
valgrind: leak on export of ooo98646-1.doc to docx
Change-Id: Idd1015fd9dfe12c085a61756fb9448fb6df09326
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index a248e85da7e9..99cde1474c1a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3329,15 +3329,6 @@ void WW8Export::ExportDocument_Impl() pFib->WriteHeader( *pStrmTemp ); } - if (m_pUsedNumTable) // all used NumRules - { - // clear the part of the list array that was copied from the document - // - it's an auto delete array, so the rest of the array which are - // duplicated lists that were added during the export will be deleted. - m_pUsedNumTable->erase(m_pUsedNumTable->begin(), m_pUsedNumTable->begin() + m_pUsedNumTable->size() - m_nUniqueList); - delete m_pUsedNumTable; - } - DELETEZ( m_pGrf ); DELETEZ( m_pMagicTable ); DELETEZ( m_pFieldFootnote ); @@ -3558,6 +3549,14 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM MSWordExportBase::~MSWordExportBase() { + if (m_pUsedNumTable) // all used NumRules + { + // clear the part of the list array that was copied from the document + // - it's an auto delete array, so the rest of the array which are + // duplicated lists that were added during the export will be deleted. + m_pUsedNumTable->erase(m_pUsedNumTable->begin(), m_pUsedNumTable->begin() + m_pUsedNumTable->size() - m_nUniqueList); + delete m_pUsedNumTable; + } delete m_pOLEExp; delete m_pOCXExp; } |