From: Kurt Zeilenga Date: Fri, 15 Jan 1999 18:04:52 +0000 (+0000) Subject: Could have no entry to return... check entry pointer before trying to X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~771 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3e3f0b88716ff4bd5ed07a8f6b88ca0ea0a26460;p=openldap Could have no entry to return... check entry pointer before trying to return cache entry. --- diff --git a/servers/slapd/back-ldbm/alias.c b/servers/slapd/back-ldbm/alias.c index 88edf68724..28d53eb7b7 100644 --- a/servers/slapd/back-ldbm/alias.c +++ b/servers/slapd/back-ldbm/alias.c @@ -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