mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:23:06 +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
1 changed files with 5 additions and 1 deletions
|
@ -1661,10 +1661,14 @@ PWINDOW_OBJECT FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
(PHANDLE)&hWnd,
|
(PHANDLE)&hWnd,
|
||||||
otWindow,
|
otWindow,
|
||||||
sizeof(WINDOW_OBJECT));
|
sizeof(WINDOW_OBJECT));
|
||||||
|
if (!Window)
|
||||||
|
{
|
||||||
|
goto AllocError;
|
||||||
|
}
|
||||||
|
|
||||||
Wnd = DesktopHeapAlloc(pti->rpdesk, sizeof(WND) + Class->cbwndExtra);
|
Wnd = DesktopHeapAlloc(pti->rpdesk, sizeof(WND) + Class->cbwndExtra);
|
||||||
|
|
||||||
if(!Window || !Wnd)
|
if (!Wnd)
|
||||||
{
|
{
|
||||||
goto AllocError;
|
goto AllocError;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue