mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Could have no entry to return... check entry pointer before trying to
return cache entry.
This commit is contained in:
parent
0c1cb93c69
commit
3e3f0b8871
@ -121,7 +121,7 @@ char *derefDN ( Backend *be,
|
||||
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"<= dereferencing dn %s\n",
|
||||
"<= dereferencing dn: \"%s\"\n",
|
||||
dn, 0, 0 );
|
||||
|
||||
newDN = ch_strdup ( dn );
|
||||
@ -203,8 +203,10 @@ char *derefDN ( Backend *be,
|
||||
}
|
||||
}
|
||||
|
||||
/* free reader lock */
|
||||
cache_return_entry_r(&li->li_cache, eMatched);
|
||||
if(eMatched != NULL) {
|
||||
/* free reader lock */
|
||||
cache_return_entry_r(&li->li_cache, eMatched);
|
||||
}
|
||||
|
||||
/*
|
||||
* the final part of the DN might be an alias
|
||||
|
Loading…
Reference in New Issue
Block a user