]> git.sur5r.net Git - openldap/commitdiff
Could have no entry to return... check entry pointer before trying to
authorKurt Zeilenga <kurt@openldap.org>
Fri, 15 Jan 1999 18:04:52 +0000 (18:04 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 15 Jan 1999 18:04:52 +0000 (18:04 +0000)
return cache entry.

servers/slapd/back-ldbm/alias.c

index 88edf68724241e03a770b33bc40e4eb3838f4d23..28d53eb7b71a38a7a5513b5aacd65cd70a6be8f6 100644 (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