From feb5f27c754325dcc5fd9eb13f305bc1c0172977 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 7 Oct 2006 23:27:14 +0000 Subject: [PATCH] windows-scache-ref-leak-20061007 return the cm_scache_t whose refCount was increased --- src/WINNT/afsd/cm_scache.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index 76b8a89afb..2d489e1200 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -765,15 +765,15 @@ cm_scache_t * cm_FindSCacheParent(cm_scache_t * scp) parent_fid.unique = scp->parentUnique; if (cm_FidCmp(&scp->fid, &parent_fid)) { - for (i=0; inextp) { - if (!cm_FidCmp(&pscp->fid, &parent_fid)) { - cm_HoldSCacheNoLock(pscp); - break; - } + i = CM_SCACHE_HASH(&parent_fid); + for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) { + if (!cm_FidCmp(&pscp->fid, &parent_fid)) { + cm_HoldSCacheNoLock(pscp); + break; } } } + lock_ReleaseRead(&cm_scacheLock); return pscp;