Index: /trunk/src/VBox/Main/include/SessionImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/SessionImpl.h	(revision 56449)
+++ /trunk/src/VBox/Main/include/SessionImpl.h	(revision 56450)
@@ -141,5 +141,5 @@
 
 
-    HRESULT i_unlockMachine(bool aFinalRelease, bool aFromServer, AutoWriteLock *pLockW);
+    HRESULT i_unlockMachine(bool aFinalRelease, bool aFromServer, AutoWriteLock &aLockW);
 
     SessionState_T mState;
Index: /trunk/src/VBox/Main/src-client/SessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/SessionImpl.cpp	(revision 56449)
+++ /trunk/src/VBox/Main/src-client/SessionImpl.cpp	(revision 56450)
@@ -123,5 +123,5 @@
                mState == SessionState_Spawning);
 
-        HRESULT rc = i_unlockMachine(true /* aFinalRelease */, false /* aFromServer */, &alock);
+        HRESULT rc = i_unlockMachine(true /* aFinalRelease */, false /* aFromServer */, alock);
         AssertComRC(rc);
     }
@@ -240,5 +240,5 @@
 
     CHECK_OPEN();
-    return i_unlockMachine(false /* aFinalRelease */, false /* aFromServer */, &alock);
+    return i_unlockMachine(false /* aFinalRelease */, false /* aFromServer */, alock);
 }
 
@@ -534,5 +534,5 @@
 
         /* close ourselves */
-        rc = i_unlockMachine(false /* aFinalRelease */, true /* aFromServer */, &alock);
+        rc = i_unlockMachine(false /* aFinalRelease */, true /* aFromServer */, alock);
     }
     else if (getObjectState().getState() == ObjectState::InUninit)
@@ -1063,5 +1063,5 @@
  *  @note To be called only from #uninit(), #UnlockMachine() or #Uninitialize().
  */
-HRESULT Session::i_unlockMachine(bool aFinalRelease, bool aFromServer, AutoWriteLock *pLockW)
+HRESULT Session::i_unlockMachine(bool aFinalRelease, bool aFromServer, AutoWriteLock &aLockW)
 {
     LogFlowThisFuncEnter();
@@ -1071,5 +1071,5 @@
     LogFlowThisFunc(("mState=%s, mType=%d\n", Global::stringifySessionState(mState), mType));
 
-    Assert(pLockW->isWriteLockOnCurrentThread());
+    Assert(aLockW.isWriteLockOnCurrentThread());
 
     if (mState != SessionState_Locked)
@@ -1138,7 +1138,7 @@
          *  SessionState_Closing here, so it's safe.
          */
-        pLockW->release();
-
-        Assert(!pLockW->isWriteLockOnCurrentThread());
+        aLockW.release();
+
+        Assert(!aLockW.isWriteLockOnCurrentThread());
 
         LogFlowThisFunc(("Calling mControl->OnSessionEnd()...\n"));
@@ -1146,5 +1146,5 @@
         LogFlowThisFunc(("mControl->OnSessionEnd()=%08X\n", rc));
 
-        pLockW->acquire();
+        aLockW.acquire();
 
         /*
