credui: Fix memory leak (found by Smatch).

This commit is contained in:
Lionel Debroux 2007-10-27 15:04:28 +02:00 committed by Alexandre Julliard
parent a155665d65
commit 0a6bdc79e3
1 changed files with 3 additions and 0 deletions

View File

@ -170,7 +170,10 @@ static INT_PTR CALLBACK CredDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
GetWindowTextW(hwndUsername, user, len + 1);
if (!user[0])
{
HeapFree(GetProcessHeap(), 0, user);
return TRUE;
}
if (!strchrW(user, '\\') && !strchrW(user, '@'))
{