coverity#1325067 Resource leak
Change-Id: I1db24c81a2698ff49dd2441ddd1bc94a1a3e6f58
This commit is contained in:
@@ -748,8 +748,13 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
|
|||||||
BitmapPalette aDummyPal;
|
BitmapPalette aDummyPal;
|
||||||
Bitmap aNewBmp(aSizePixel, nBitCount, &aDummyPal);
|
Bitmap aNewBmp(aSizePixel, nBitCount, &aDummyPal);
|
||||||
BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
|
BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
|
||||||
if (!pAcc || pAcc->Width() != aHeader.nWidth || pAcc->Height() != aHeader.nHeight)
|
if (!pAcc)
|
||||||
return false;
|
return false;
|
||||||
|
if (pAcc->Width() != aHeader.nWidth || pAcc->Height() != aHeader.nHeight)
|
||||||
|
{
|
||||||
|
Bitmap::ReleaseAccess(pAcc);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Bitmap aNewBmpAlpha;
|
Bitmap aNewBmpAlpha;
|
||||||
BitmapWriteAccess* pAccAlpha = 0;
|
BitmapWriteAccess* pAccAlpha = 0;
|
||||||
bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
|
bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
|
||||||
|
Reference in New Issue
Block a user