sd/source/ui/app/sdmod.cxx | 4 +--- sfx2/source/control/shell.cxx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
New commits: commit f0aef9b31f91d5aba71b6879ad13e39241aa4f0f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 3 11:37:18 2015 +0000 valgrind: fix leak ==1739== by 0x7A93F1C: SfxUInt16Item::Clone(SfxItemPool*) const (in core/instdir/program/libsvllo.so) ==1739== by 0x7047E11: SfxShell::PutItem(SfxPoolItem const&) (shell.cxx:196) ==1739== by 0x27FCA298: SdModule::GetSdOptions(DocumentType) (sdmod.cxx:172) none of the other uses of pCache->SetState clone, and I don't see why this one does. Change-Id: I7d3cf6969c433c890776dfbcc1dc57d72420b6e2 diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 909213a..8f0f06c 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -103,9 +103,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 ) SdModule::~SdModule() { delete pSearchItem; - - if( pNumberFormatter ) - delete pNumberFormatter; + delete pNumberFormatter; ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); if( pDocShell ) diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 445780d..3aee3e0 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -193,7 +193,7 @@ void SfxShell::PutItem SfxStateCache* pCache = pBindings->GetStateCache( nSlotId ); if ( pCache ) { - pCache->SetState( SfxItemState::DEFAULT, pItem->Clone(), true ); + pCache->SetState( SfxItemState::DEFAULT, pItem, true ); pCache->SetCachedState( true ); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits