mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
Fix accidentally introduced thread and memory leak when the cache should be run down
svn path=/trunk/; revision=27109
This commit is contained in:
parent
f7d3dc0bd6
commit
c3bd31ab5a
1 changed files with 5 additions and 1 deletions
|
@ -158,7 +158,11 @@ ReferenceSidCacheMgr(IN HANDLE SidCacheMgr)
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue