[MSGINA]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 09:39:20 +0000 (09:39 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 09:39:20 +0000 (09:39 +0000)
Don't leak memory

CID 1206901

svn path=/trunk/; revision=69667

reactos/dll/win32/msgina/gui.c

index 3ac474d..ec41f4b 100644 (file)
@@ -1306,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))
     {