diff -r d141fc1ad77b -r e61a04404bdf mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp --- a/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Tue Jul 06 14:48:59 2010 +0300 +++ b/mmappcomponents/mmmtpdataprovider/src/cmmmtpdpmetadatampxaccess.cpp Wed Aug 18 10:16:02 2010 +0300 @@ -902,7 +902,7 @@ delete iSampleData; iSampleData = NULL; - iSampleData = HBufC8::NewL( numElements * sizeof( TUint8 ) ); + iSampleData = HBufC8::NewL( numElements ); TPtr8 samplePtr = iSampleData->Des(); mtpTypeArray.ToDes( samplePtr ); RFile sampleFile; @@ -1522,12 +1522,6 @@ PRINT( _L( "MM MTP <> Modified contents are:" ) ); foundMedia = FindWMPMediaLC( KMPXMediaGeneralModified, ETrue ); // + foundMedia - - if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) ) - { - User::Leave( KErrNotSupported ); - } - foundItemCount = *foundMedia->Value( KMPXMediaArrayCount ); PRINT1( _L( "MM MTP <> CMmMtpDpMetadataMpxAccess::GetModifiedContentL() found %d Media Objects" ), foundItemCount ); @@ -1600,14 +1594,14 @@ CleanupStack::PopAndDestroy( &playlistAttributes ); // - playlistAttributes CleanupStack::PopAndDestroy( searchMedia ); // - searchMedia + CleanupStack::PushL( foundMedia ); // + foundMedia if ( !foundMedia->IsSupported( KMPXMediaArrayCount ) ) User::Leave( KErrNotSupported ); TInt foundItemCount = *foundMedia->Value( KMPXMediaArrayCount ); - delete foundMedia; - foundMedia = NULL; + CleanupStack::PopAndDestroy( foundMedia ); // - foundMedia PRINT1( _L( "MM MTP <= CMmMtpDpMetadataMpxAccess::IsExist foundItemCount(%d)" ), foundItemCount ); return ( foundItemCount > 0 ? ETrue : EFalse );