summaryrefslogtreecommitdiff
path: root/sw/source/core/text/pormulti.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-03-15 12:54:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-15 12:54:58 +0000
commit303cb25751373743b978a5da9c6c2d6d1d0dda3d (patch)
treefb2e5d5fc66e9f8c1b7e88e1003668923cbb0555 /sw/source/core/text/pormulti.cxx
parentaa479a03390e9a779321fae26146cc1493cdf97c (diff)
Resolves: coverity#705746 resource leak
Change-Id: I379f8bd780f40169ed7c70c7c5a28277091b978e
Diffstat (limited to 'sw/source/core/text/pormulti.cxx')
-rw-r--r--sw/source/core/text/pormulti.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 12cd6e760ebb..e99fcc9e4220 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -740,16 +740,16 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
{
if( !pCurr->GetPortion() )
pCurr->SetPortion( new SwTxtPortion( *pCurr ) );
- SwMarginPortion *pMarg = new SwMarginPortion( 0 );
if( nLeft )
{
+ SwMarginPortion *pMarg = new SwMarginPortion( 0 );
pMarg->AddPrtWidth( nLeft );
pMarg->SetPortion( pCurr->GetPortion() );
pCurr->SetPortion( pMarg );
}
if( nRight )
{
- pMarg = new SwMarginPortion( 0 );
+ SwMarginPortion *pMarg = new SwMarginPortion( 0 );
pMarg->AddPrtWidth( nRight );
pCurr->FindLastPortion()->Append( pMarg );
}