]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backover.c
- setup framework for monitoring of back-bdb/back-hdb stuff in their
[openldap] / servers / slapd / backover.c
index 33b31d540084a8628c5dbcc8f3c480cac38a1b8b..3ffd18828508066aff7add1f0da3246b26808a82 100644 (file)
@@ -210,10 +210,13 @@ over_db_destroy(
 
        rc = over_db_func( be, db_destroy );
 
-       for (next = on->on_next; on; on=next) {
-               next = on->on_next;
-               free( on );
+       if ( on ) {
+               for (next = on->on_next; on; on=next) {
+                       next = on->on_next;
+                       free( on );
+               }
        }
+
        free( oi );
        return rc;
 }
@@ -239,7 +242,6 @@ over_back_response ( Operation *op, SlapReply *rs )
        return rc;
 }
 
-#ifdef SLAP_OVERLAY_ACCESS
 static int
 over_access_allowed(
        Operation               *op,
@@ -450,7 +452,6 @@ over_acl_attribute(
 
        return rc;
 }
-#endif /* SLAP_OVERLAY_ACCESS */
 
 /*
  * default return code in case of missing backend function
@@ -1018,12 +1019,10 @@ overlay_config( BackendDB *be, const char *ov )
                bi->bi_chk_referrals = over_aux_chk_referrals;
                bi->bi_chk_controls = over_aux_chk_controls;
 
-#ifdef SLAP_OVERLAY_ACCESS
                /* these have specific arglists */
                bi->bi_access_allowed = over_access_allowed;
                bi->bi_acl_group = over_acl_group;
                bi->bi_acl_attribute = over_acl_attribute;
-#endif /* SLAP_OVERLAY_ACCESS */
                
                bi->bi_connection_init = over_connection_init;
                bi->bi_connection_destroy = over_connection_destroy;
@@ -1058,7 +1057,11 @@ overlay_config( BackendDB *be, const char *ov )
                be->bd_info = (BackendInfo *)on2;
                rc = on2->on_bi.bi_db_init( be );
                be->bd_info = (BackendInfo *)oi;
-               if ( rc ) return rc;
+               if ( rc ) {
+                       oi->oi_list = on2->on_next;
+                       ch_free( on2 );
+                       return rc;
+               }
        }
 
        return 0;