cui/source/options/treeopt.cxx | 2 ++ lotuswordpro/source/filter/lwptable.cxx | 21 +++++---------------- 2 files changed, 7 insertions(+), 16 deletions(-)
New commits: commit 890a48813134a43de31afd8ac3939fa454b610fe Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 10 20:32:36 2013 +0100 CID#736398 resource leak Change-Id: Ie1fc0aa191950bdf26fd376ec1e2c8ae69acde83 diff --git a/lotuswordpro/source/filter/lwptable.cxx b/lotuswordpro/source/filter/lwptable.cxx index a8d328c..1a3022f 100644 --- a/lotuswordpro/source/filter/lwptable.cxx +++ b/lotuswordpro/source/filter/lwptable.cxx @@ -197,7 +197,6 @@ void LwpGlossary::Read() sal_uInt16 FiledEntries = m_pObjStrm->QuickReaduInt16(); sal_uInt16 NumIndexRows = GetNumIndexRows(); - sal_uInt16 * cpIndex = NULL; if (FiledEntries < NumIndexRows) { /* We'll have to do sequential (slow) searches. */ @@ -207,23 +206,13 @@ void LwpGlossary::Read() { if (NumIndexRows) { - sal_uInt16 EntriesRead, EntryCount; - sal_uInt16 *pRowID; + sal_uInt16 EntriesRead = (FiledEntries > NumIndexRows)? NumIndexRows:FiledEntries; - cpIndex = new sal_uInt16[NumIndexRows]; + for (sal_uInt16 EntryCount = 1; EntryCount <= EntriesRead; EntryCount++) + m_pObjStrm->QuickReaduInt16(); - if (cpIndex) - { - pRowID = cpIndex; - - EntriesRead = (FiledEntries > NumIndexRows)? NumIndexRows:FiledEntries; - - for (EntryCount = 1; EntryCount <= EntriesRead; EntryCount++) - *pRowID++ = m_pObjStrm->QuickReaduInt16(); - - if (FiledEntries > EntriesRead) - m_pObjStrm->SeekRel((FiledEntries - EntriesRead)* sizeof(sal_uInt16)); - } + if (FiledEntries > EntriesRead) + m_pObjStrm->SeekRel((FiledEntries - EntriesRead)* sizeof(sal_uInt16)); } else m_pObjStrm->SeekRel(FiledEntries * sizeof(sal_uInt16)); commit 2e96061e6d796110ea74513b71aee560ac01cd57 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Sep 10 20:29:12 2013 +0100 CID#736323 resource leak Change-Id: I264011a8371e71e28bda8ed853894088f680cd71 diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 47cdb64..3602995 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2155,6 +2155,8 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( { pModule ? aNodeList.push_back( pNode ) : aOutNodeList.push_back( pNode ); } + else + delete pNode; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits