Could have no entry to return... check entry pointer before trying to

return cache entry.
This commit is contained in:
Kurt Zeilenga 1999-01-15 18:04:52 +00:00
parent 0c1cb93c69
commit 3e3f0b8871

View File

@ -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