Fix a bug, where a failure to allocate the kernel mode WINDOW_OBJECT would cause a page fault, because the WND was still allocated, but never initialized, and Wnd->rpdesktop was then dereferenced to free the WND again.

svn path=/trunk/; revision=48785
This commit is contained in:
Timo Kreuzer 2010-09-17 01:34:50 +00:00
parent 30fad2a263
commit 253e949e7a

View file

@ -1661,10 +1661,14 @@ PWINDOW_OBJECT FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
(PHANDLE)&hWnd,
otWindow,
sizeof(WINDOW_OBJECT));
if (!Window)
{
goto AllocError;
}
Wnd = DesktopHeapAlloc(pti->rpdesk, sizeof(WND) + Class->cbwndExtra);
if(!Window || !Wnd)
if (!Wnd)
{
goto AllocError;
}