Fix bug # 169975 - LDAP memory cache accesses response

list w/o locking mutex.
This commit is contained in:
mcs%netscape.com 2002-11-01 19:57:09 +00:00
parent bdcd3fffd2
commit c1aa011ff3

View File

@ -1101,6 +1101,8 @@ memcache_add_to_ld(LDAP *ld, int msgid, LDAPMessage *pMsg)
if (nRes != LDAP_SUCCESS)
return nRes;
LDAP_MUTEX_LOCK( ld, LDAP_RESP_LOCK );
for (r = &(ld->ld_responses); *r; r = &((*r)->lm_next))
if ((*r)->lm_msgid == msgid)
break;
@ -1111,6 +1113,8 @@ memcache_add_to_ld(LDAP *ld, int msgid, LDAPMessage *pMsg)
}
*r = pCopy;
LDAP_MUTEX_UNLOCK( ld, LDAP_RESP_LOCK );
return nRes;
}