Author: tkreuzer Date: Mon Nov 18 15:21:53 2013 New Revision: 61039
URL: http://svn.reactos.org/svn/reactos?rev=61039&view=rev Log: [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.
Modified: trunk/reactos/ntoskrnl/rtl/libsupp.c
Modified: trunk/reactos/ntoskrnl/rtl/libsupp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/libsupp.c?rev=... ============================================================================== --- trunk/reactos/ntoskrnl/rtl/libsupp.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/rtl/libsupp.c [iso-8859-1] Mon Nov 18 15:21:53 2013 @@ -535,14 +535,25 @@ 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; }