landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp
branchRCL_3
changeset 10 d6e4203b7ebe
parent 8 6fcbaa43369c
child 20 2b4ea9893b66
--- a/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp	Wed Apr 14 16:23:43 2010 +0300
+++ b/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp	Tue Apr 27 17:05:00 2010 +0300
@@ -751,7 +751,8 @@
         
         TPtr name( lmBuf->Des() );
         readStream.ReadL( name, nameLen );
-        
+
+        CleanupStack::Pop( lmBuf );//ownership of lmBuf is transferred in the call to UpdateL/InsertL
         if ( aMessage.Int0() == EPosLmServerUpdateLandmarks ) 
             {
 //coverity[freed_arg : FALSE]
@@ -762,7 +763,6 @@
             index.InsertL( id, lmBuf );
             }
 //coverity[pass_freed_arg : FALSE]
-        CleanupStack::Pop( lmBuf );
         }
     
     readStream.Close();