bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp
changeset 1 6a1fe72036e3
parent 0 f63038272f30
child 2 0b192a3a05a4
--- a/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp	Mon Jan 18 20:28:57 2010 +0200
+++ b/bluetoothengine/btmac/src/BTMonoCmdHandler/btmcprotocol.cpp	Tue Jan 26 12:06:42 2010 +0200
@@ -838,8 +838,8 @@
     if (response)
         {
         RATResultPtrArray resarr;
+        CleanupStack::PushL(code);
         ATObjArrayCleanupResetAndDestroyPushL(resarr);        
-        CleanupStack::PushL(code);
         resarr.AppendL(code);
         CleanupStack::Pop(code);
         CATResult* ok = CATResult::NewL(EATOK);
@@ -1077,9 +1077,9 @@
             LEAVE_IF_ERROR(params.Append(TATParam(buf)))
             code = CATResult::NewL(EATCGSN, EATActionResult, &params);
             CleanupStack::PopAndDestroy(&params);
+            CleanupStack::PushL(code);
             RATResultPtrArray resarr;
             ATObjArrayCleanupResetAndDestroyPushL(resarr);        
-            CleanupStack::PushL(code);
             resarr.AppendL(code);
             CleanupStack::Pop(code);
             CATResult* ok = CATResult::NewL(EATOK);
@@ -1116,7 +1116,7 @@
         {
         TRACE_FUNC_ENTRY
         iTimerActive = CBtmcActive::NewL(*this, CActive::EPriorityStandard, aService);
-        iTimer.CreateLocal();
+        LEAVE_IF_ERROR(iTimer.CreateLocal());
         iTimer.After(iTimerActive->iStatus, aTimeout);
         iTimerActive->GoActive();
         TRACE_FUNC_EXIT