btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp
changeset 47 9e2a905b887f
parent 42 b72428996822
child 51 625f43ae9362
--- a/btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp	Mon Jul 12 19:25:26 2010 +0300
+++ b/btobexprofiles/obexserviceman/utils/src/obexutilsmessagehandler.cpp	Fri Jul 23 15:57:13 2010 +0300
@@ -342,11 +342,13 @@
     TPtrC mimeType16(buf16->Des());
     CleanupStack::PopAndDestroy();   //   buf16
     
-    CUpdateMusicCollection* updateMusicCollection = CUpdateMusicCollection::NewL() ;
+    CUpdateMusicCollection* updateMusicCollection = CUpdateMusicCollection::NewL();
+    CleanupStack::PushL(updateMusicCollection);    
     if (updateMusicCollection->isSupported(mimeType16))
         {
         updateMusicCollection->addToCollectionL(aFileName);
         }
+    CleanupStack::PopAndDestroy();  // updateMusicCollection
     
     aAttachInfo->SetMimeTypeL( mimeType );