From 3e3f0b88716ff4bd5ed07a8f6b88ca0ea0a26460 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 15 Jan 1999 18:04:52 +0000 Subject: [PATCH] Could have no entry to return... check entry pointer before trying to return cache entry. --- servers/slapd/back-ldbm/alias.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.39.5