[MSGINA]
[reactos.git] / reactos / dll / win32 / msgina / gui.c
index 3da57d0..ec41f4b 100644 (file)
@@ -1161,7 +1161,8 @@ LoggedOutWindowProc(
                     return TRUE;
 
                 case IDC_SHUTDOWN:
-                    EndDialog(hwndDlg, WLX_SAS_ACTION_SHUTDOWN);
+                    if (OnShutDown(hwndDlg, pgContext) == IDOK)
+                        EndDialog(hwndDlg, pgContext->nShutdownAction);
                     return TRUE;
             }
             break;
@@ -1305,7 +1306,10 @@ DoUnlock(
     BOOL res = FALSE;
 
     if (GetTextboxText(hwndDlg, IDC_USERNAME, &UserName) && *UserName == '\0')
+    {
+        HeapFree(GetProcessHeap(), 0, UserName);
         return FALSE;
+    }
 
     if (GetTextboxText(hwndDlg, IDC_PASSWORD, &Password))
     {