diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 09:10:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-29 11:10:27 +0100 |
commit | d654c1195450f21e112adbb76b8a13b3b09dfa73 (patch) | |
tree | dcef02d25c080f6a247fd5229c5c81ef8307793a /svx | |
parent | 92ffbf51b3d74ceb45e473db84a7493e1219b7c4 (diff) |
coverity#705736 Resource leak
Change-Id: I124f75e56aad1bd5008a7d9d64328b0e6e5f874c
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/xattrbmp.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index b4cdfe315c83..bfc06ca9d0ac 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -248,6 +248,8 @@ Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, C bool isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront) { + bool bRet(false); + if(!rBitmapEx.IsTransparent()) { Bitmap aBitmap(rBitmapEx.GetBitmap()); @@ -269,14 +271,16 @@ bool isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColo o_rFront = rPalette[1]; o_rBack = rPalette[0]; - return true; + bRet = true; } + + Bitmap::ReleaseAccess(pRead); } } } } - return false; + return bRet; } XFillBitmapItem::XFillBitmapItem(SvStream& rIn, sal_uInt16 nVer) |