DEVEL15-windows-scache-ref-leak-20061007

return the cm_scache_t whose refCount was increased


(cherry picked from commit feb5f27c754325dcc5fd9eb13f305bc1c0172977)
This commit is contained in:
Jeffrey Altman 2006-10-07 23:29:12 +00:00
parent c451a02881
commit 7486e2f4c2

View File

@ -767,15 +767,15 @@ cm_scache_t * cm_FindSCacheParent(cm_scache_t * scp)
parent_fid.unique = scp->parentUnique; parent_fid.unique = scp->parentUnique;
if (cm_FidCmp(&scp->fid, &parent_fid)) { if (cm_FidCmp(&scp->fid, &parent_fid)) {
for (i=0; i<cm_data.hashTableSize; i++) { i = CM_SCACHE_HASH(&parent_fid);
for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) { for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
if (!cm_FidCmp(&pscp->fid, &parent_fid)) { if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
cm_HoldSCacheNoLock(pscp); cm_HoldSCacheNoLock(pscp);
break; break;
}
} }
} }
} }
lock_ReleaseRead(&cm_scacheLock); lock_ReleaseRead(&cm_scacheLock);
return pscp; return pscp;