mirror of
https://github.com/reactos/reactos.git
synced 2024-08-20 18:35:32 +00:00
[WIN32K]
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:
parent
30fad2a263
commit
253e949e7a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue