mirror of
https://github.com/reactos/reactos.git
synced 2025-05-16 15:50:24 +00:00
[NTOSKRNL]
Implement RtlpCloseHandleCallback, closing the handle table, and use it as callback for ExSweepHandleTable in RtlpDestroyAtomHandleTable. Without a callback ExSweepHandleTable simply crashes, so obviously we never clean up any atom tables, possibly because the window station is never closed. svn path=/trunk/; revision=61039
This commit is contained in:
parent
954e21ccc0
commit
6f0131873e
1 changed files with 13 additions and 2 deletions
|
@ -535,14 +535,25 @@ RtlpCreateAtomHandleTable(PRTL_ATOM_TABLE AtomTable)
|
|||
return (AtomTable->ExHandleTable != NULL);
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
RtlpCloseHandleCallback(
|
||||
IN PHANDLE_TABLE_ENTRY HandleTableEntry,
|
||||
IN HANDLE Handle,
|
||||
IN PVOID HandleTable)
|
||||
{
|
||||
/* Destroy and unlock the handle entry */
|
||||
return ExDestroyHandle(HandleTable, Handle, HandleTableEntry);
|
||||
}
|
||||
|
||||
VOID
|
||||
RtlpDestroyAtomHandleTable(PRTL_ATOM_TABLE AtomTable)
|
||||
{
|
||||
if (AtomTable->ExHandleTable)
|
||||
{
|
||||
ExSweepHandleTable(AtomTable->ExHandleTable,
|
||||
NULL,
|
||||
NULL);
|
||||
RtlpCloseHandleCallback,
|
||||
AtomTable->ExHandleTable);
|
||||
ExDestroyHandleTable(AtomTable->ExHandleTable, NULL);
|
||||
AtomTable->ExHandleTable = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue