From f83b257104a41d06d299cfd6bea7bf62bb475bde Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Fri, 24 Apr 2015 14:35:58 +0000 Subject: [PATCH] [WIN32K] fix a memory leak add a missing pool tag some spelling fixes svn path=/trunk/; revision=67381 --- reactos/win32ss/user/ntuser/desktop.c | 2 +- reactos/win32ss/user/ntuser/window.c | 7 ++++--- reactos/win32ss/user/ntuser/winsta.c | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/reactos/win32ss/user/ntuser/desktop.c b/reactos/win32ss/user/ntuser/desktop.c index b33ec445849..cbd6b2040c1 100644 --- a/reactos/win32ss/user/ntuser/desktop.c +++ b/reactos/win32ss/user/ntuser/desktop.c @@ -823,7 +823,7 @@ UserBuildShellHookHwndList(PDESKTOP Desktop) PSHELL_HOOK_WINDOW Current; 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; while (ListEntry != &Desktop->ShellHookWindows) { diff --git a/reactos/win32ss/user/ntuser/window.c b/reactos/win32ss/user/ntuser/window.c index fa2cbf2be84..ea3b0877126 100644 --- a/reactos/win32ss/user/ntuser/window.c +++ b/reactos/win32ss/user/ntuser/window.c @@ -1451,6 +1451,7 @@ NtUserBuildHwndList( dwCount++; } } + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } ObDereferenceObject(Thread); @@ -2795,11 +2796,11 @@ IntFindWindow(PWND Parent, (Child->strName.Length < 0xFFFF && !RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE))) { - Ret = Child->head.h; - break; + Ret = Child->head.h; + break; + } } } - } ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } diff --git a/reactos/win32ss/user/ntuser/winsta.c b/reactos/win32ss/user/ntuser/winsta.c index 092f643dad7..64b37cd389f 100644 --- a/reactos/win32ss/user/ntuser/winsta.c +++ b/reactos/win32ss/user/ntuser/winsta.c @@ -487,7 +487,7 @@ NtUserCreateWindowStation( if (InputWindowStation == NULL) { - ERR("Initializeing input window station\n"); + ERR("Initializing input window station\n"); InputWindowStation = WindowStationObject; WindowStationObject->Flags &= ~WSS_NOIO; @@ -1369,12 +1369,12 @@ BuildDesktopNameList( * Size of buffer passed by caller. * * 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 * NULL-terminated window station/desktop names. * * 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. * * Status @@ -1495,7 +1495,7 @@ NtUserSetWindowStationUser( if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(WindowStation->psidUser, 0); + ExFreePoolWithTag(WindowStation->psidUser, USERTAG_SECURITY); WindowStation->psidUser = 0; goto Leave; }