[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:
Timo Kreuzer 2013-11-18 15:21:53 +00:00
parent 954e21ccc0
commit 6f0131873e

View file

@ -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;
}