mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Delay free(e.e_ndn) in cache_find_entry_dn2id() to after "goto try_again"
This commit is contained in:
parent
2b2c154ae6
commit
dae494e45d
1 changed files with 3 additions and 7 deletions
|
|
@ -445,7 +445,6 @@ try_again:
|
|||
* we do not need to lock the entry if we only
|
||||
* check the state, refcnt, LRU, and id.
|
||||
*/
|
||||
free(e.e_ndn);
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
assert( ep->e_private );
|
||||
|
|
@ -477,11 +476,8 @@ try_again:
|
|||
|
||||
/* save id */
|
||||
id = ep->e_id;
|
||||
|
||||
/* free cache mutex */
|
||||
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
|
||||
|
||||
return( id );
|
||||
} else {
|
||||
id = NOID;
|
||||
}
|
||||
|
||||
free(e.e_ndn);
|
||||
|
|
@ -489,7 +485,7 @@ try_again:
|
|||
/* free cache mutex */
|
||||
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
|
||||
|
||||
return( NOID );
|
||||
return( id );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue