fix a memory leak
add a missing pool tag
some spelling fixes

svn path=/trunk/; revision=67381
This commit is contained in:
Christoph von Wittich 2015-04-24 14:35:58 +00:00
parent 1fae599114
commit f83b257104
3 changed files with 9 additions and 8 deletions

View file

@ -823,7 +823,7 @@ UserBuildShellHookHwndList(PDESKTOP Desktop)
PSHELL_HOOK_WINDOW Current; PSHELL_HOOK_WINDOW Current;
HWND* list; HWND* list;
/* FIXME: If we save nb elements in desktop, we dont have to loop to find nb entries */ /* FIXME: If we save nb elements in desktop, we don't have to loop to find nb entries */
ListEntry = Desktop->ShellHookWindows.Flink; ListEntry = Desktop->ShellHookWindows.Flink;
while (ListEntry != &Desktop->ShellHookWindows) while (ListEntry != &Desktop->ShellHookWindows)
{ {

View file

@ -1451,6 +1451,7 @@ NtUserBuildHwndList(
dwCount++; dwCount++;
} }
} }
ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
} }
ObDereferenceObject(Thread); ObDereferenceObject(Thread);
@ -2795,11 +2796,11 @@ IntFindWindow(PWND Parent,
(Child->strName.Length < 0xFFFF && (Child->strName.Length < 0xFFFF &&
!RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE))) !RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE)))
{ {
Ret = Child->head.h; Ret = Child->head.h;
break; break;
}
} }
} }
}
ExFreePoolWithTag(List, USERTAG_WINDOWLIST); ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
} }

View file

@ -487,7 +487,7 @@ NtUserCreateWindowStation(
if (InputWindowStation == NULL) if (InputWindowStation == NULL)
{ {
ERR("Initializeing input window station\n"); ERR("Initializing input window station\n");
InputWindowStation = WindowStationObject; InputWindowStation = WindowStationObject;
WindowStationObject->Flags &= ~WSS_NOIO; WindowStationObject->Flags &= ~WSS_NOIO;
@ -1369,12 +1369,12 @@ BuildDesktopNameList(
* Size of buffer passed by caller. * Size of buffer passed by caller.
* *
* lpBuffer * lpBuffer
* Buffer passed by caller. If the function succedes, the buffer is * Buffer passed by caller. If the function succeeds, the buffer is
* filled with window station/desktop count (in first DWORD) and * filled with window station/desktop count (in first DWORD) and
* NULL-terminated window station/desktop names. * NULL-terminated window station/desktop names.
* *
* pRequiredSize * pRequiredSize
* If the function suceedes, this is the number of bytes copied. * If the function succeeds, this is the number of bytes copied.
* Otherwise it's size of buffer needed for function to succeed. * Otherwise it's size of buffer needed for function to succeed.
* *
* Status * Status
@ -1495,7 +1495,7 @@ NtUserSetWindowStationUser(
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
ExFreePoolWithTag(WindowStation->psidUser, 0); ExFreePoolWithTag(WindowStation->psidUser, USERTAG_SECURITY);
WindowStation->psidUser = 0; WindowStation->psidUser = 0;
goto Leave; goto Leave;
} }