Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 43638)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 43639)
@@ -734,4 +734,8 @@
     }
 
+    /** @todo This eventually needs a bit of revamping so that a valid session gets passed
+     *        into this function already so that we don't need to mess around with closing
+     *        the session all over the places below again. Later. */
+
     ComPtr<IGuestSession> pGuestSession;
     rc = pGuest->CreateSession(Bstr(strUsername).raw(),
@@ -762,4 +766,6 @@
     {
         ctrlPrintError(pGuestSession, COM_IIDOF(IGuestSession));
+
+        pGuestSession->Close();
         return RTEXITCODE_FAILURE;
     }
@@ -805,4 +811,6 @@
             {
                 ctrlPrintError(pProcess, COM_IIDOF(IProcess));
+
+                pGuestSession->Close();
                 return RTEXITCODE_FAILURE;
             }
@@ -819,4 +827,6 @@
                         {
                             ctrlPrintError(pProcess, COM_IIDOF(IProcess));
+
+                            pGuestSession->Close();
                             return RTEXITCODE_FAILURE;
                         }
@@ -875,4 +885,6 @@
             {
                 ctrlPrintError(pProcess, COM_IIDOF(IProcess));
+
+                pGuestSession->Close();
                 return RTEXITCODE_FAILURE;
             }
@@ -882,8 +894,12 @@
             {
                 ctrlPrintError(pProcess, COM_IIDOF(IProcess));
+
+                pGuestSession->Close();
                 return RTEXITCODE_FAILURE;
             }
             if (fVerbose)
                 RTPrintf("Exit code=%u (Status=%u [%s])\n", exitCode, status, ctrlExecProcessStatusToText(status));
+
+            pGuestSession->Close();
             return ctrlExecProcessStatusToExitCode(status, exitCode);
         }
@@ -892,4 +908,6 @@
             if (fVerbose)
                 RTPrintf("Process execution aborted!\n");
+
+            pGuestSession->Close();
             return EXITCODEEXEC_TERM_ABEND;
         }
@@ -2685,4 +2703,6 @@
                  || !strcmp(pArg->argv[1], "updateadds"))
             rcExit = handleCtrlUpdateAdditions(guest, &arg);
+        /** @todo Implement a "sessions list" command to list all opened
+         *        guest sessions along with their (friendly) names. */
         else
             rcExit = errorSyntax(USAGE_GUESTCONTROL, "Unknown sub command '%s' specified!", pArg->argv[1]);
