Author: weiden
Date: Sun Jun 10 15:24:34 2007
New Revision: 27109
URL: http://svn.reactos.org/svn/reactos?rev=27109&view=rev
Log:
Fix accidentally introduced thread and memory leak when the cache should be run down
Modified:
trunk/reactos/dll/win32/aclui/sidcache.c
Modified: trunk/reactos/dll/win32/aclui/sidcache.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/aclui/sidcache.c…
==============================================================================
--- trunk/reactos/dll/win32/aclui/sidcache.c (original)
+++ trunk/reactos/dll/win32/aclui/sidcache.c Sun Jun 10 15:24:34 2007
@@ -158,7 +158,11 @@
static VOID
DereferenceSidCacheMgr(IN PSIDCACHEMGR scm)
{
- InterlockedDecrement(&scm->RefCount);
+ if (InterlockedDecrement(&scm->RefCount) == 0)
+ {
+ /* Signal the lookup thread so it can terminate */
+ SetEvent(scm->LookupEvent);
+ }
}