[WIN32K] Prevent dereferencing NULL pointer
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Fri, 18 Aug 2023 05:35:59 +0000 (08:35 +0300)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 21 Sep 2023 20:45:31 +0000 (23:45 +0300)
commit4661bc006d0e49e78b1ebaee9509e078f12c70a8
tree52625039a028a4e6220a4b52187a46f9eb293595
parent41c99aa60ad9e8d9141caa988b68d54911d64c00
[WIN32K] Prevent dereferencing NULL pointer

Initialize a window's ThreadListEntry as an empty list on creation and only remove the window from the list on destruction, when the entry is not an empty list. Previously the window creation could fail before the list entry was initialized and the window would get destroyed after that, resulting in a NULL pointer dereference.
win32ss/user/ntuser/window.c