From 4b1ecc4c7da84eee69c583222b62afbf6afed3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 24 Jan 2014 13:50:41 +0000 Subject: [PATCH] coverity#705740 Resource leak Change-Id: I646d7eabf77843f639ede33d018eac338c5d0d27 --- sw/source/core/doc/tblcpy.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 869af75be322..8100d47c56c6 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -938,7 +938,10 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes, { if( !( pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx ]) ->GetSttNd() ) + { + delete pInsFLine; return sal_False; + } // if Ok, insert the Box into the FndLine pFndBox = new _FndBox( pTmpBox, pInsFLine ); pInsFLine->GetBoxes().insert( pInsFLine->GetBoxes().begin() + nBx, pFndBox );