imagehandlingutilities/thumbnailmanager/plugins/audio/src/thumbnailimagedecoderv3.cpp
--- a/imagehandlingutilities/thumbnailmanager/plugins/audio/src/thumbnailimagedecoderv3.cpp Wed Jun 09 10:01:32 2010 +0300
+++ b/imagehandlingutilities/thumbnailmanager/plugins/audio/src/thumbnailimagedecoderv3.cpp Mon Jun 21 16:00:46 2010 +0300
@@ -137,8 +137,7 @@
TInt err = iBitmap->Create( loadSize, aDisplayMode );
if (err != KErrNone)
{
- delete iBitmap;
- iBitmap = NULL;
+ Release();
User::Leave(err);
}
@@ -240,9 +239,7 @@
TRAPD( decErr, iDecoder = CImageDecoder::DataNewL( iFs, *iBuffer, options ) );
if ( decErr != KErrNone )
{
- delete iBuffer;
- iBuffer = NULL;
-
+ Release();
TN_DEBUG2( "CThumbnailImageDecoderv3::CreateDecoderL() - CImageDecoder error %d", decErr );
User::Leave( decErr );
@@ -282,6 +279,7 @@
//no sense to try other codecs if image is corrupted
if( aError == KErrCorrupt || aError == KErrUnderflow)
{
+ Release();
User::Leave( aError );
}
}