]> git.sur5r.net Git - openldap/commitdiff
don't use missing hooks (ITS#3817)
authorPierangelo Masarati <ando@openldap.org>
Fri, 1 Jul 2005 09:25:55 +0000 (09:25 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 1 Jul 2005 09:25:55 +0000 (09:25 +0000)
servers/slapd/overlays/glue.c

index 965a1e9895c3e7b7f687b040dfd164607f72ac28..fda3061d6c5fbb034f6d90b514ec7944a2ce4aad 100644 (file)
@@ -549,14 +549,23 @@ glue_entry_release_rw (
 )
 {
        BackendDB *b0, b2;
-       int rc;
+       int rc = -1;
 
        b0 = op->o_bd;
        b2 = *op->o_bd;
        b2.bd_info = (BackendInfo *)glue_tool_inst( op->o_bd->bd_info );
        op->o_bd = glue_back_select (&b2, &e->e_nname);
 
-       rc = op->o_bd->be_release( op, e, rw );
+       if ( op->o_bd->be_release ) {
+               rc = op->o_bd->be_release( op, e, rw );
+
+       } else {
+               /* FIXME: mimic be_entry_release_rw
+                * when no be_release() available */
+               /* free entry */
+               entry_free( e );
+               rc = 0;
+       }
        op->o_bd = b0;
        return rc;
 }