]> git.sur5r.net Git - openldap/commitdiff
fixes from HEAD
authorKurt Zeilenga <kurt@openldap.org>
Tue, 4 Apr 2006 22:29:34 +0000 (22:29 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 4 Apr 2006 22:29:34 +0000 (22:29 +0000)
servers/slapd/back-ldbm/compare.c
servers/slapd/back-ldbm/idl.c
servers/slapd/back-ldbm/modify.c

index ab6022809edb02bc53923fb0148ca8dfdd4721d3..7100bed6ed58171c4c093bbcd7f4c496ccaafe61 100644 (file)
@@ -107,7 +107,7 @@ ldbm_back_compare(
        }
 
 return_results:;
-       cache_return_entry_r( &li->li_cache, e );
+       if ( e ) cache_return_entry_r( &li->li_cache, e );
        ldap_pvt_thread_rdwr_runlock(&li->li_giant_rwlock);
 
        send_ldap_result( op, rs );
index 6feeee00501382d5b9179011413a33dd03cf3e2f..dec8ef4c9e64036c8a2f232256d0f7bd80fc5b96 100644 (file)
@@ -112,6 +112,7 @@ idl_allids( Backend *be )
        idl = idl_alloc( 0 );
        ID_BLOCK_NMAX(idl) = ID_BLOCK_ALLIDS_VALUE;
        if ( next_id_get( be, &id ) ) {
+               idl_free( idl );
                return NULL;
        }
        ID_BLOCK_NIDS(idl) = id;
index 9625682841c9decf629faa986a2ca0896b1ed036..18557bf6245954658052d001d3d1b0b92d6168b0 100644 (file)
@@ -259,7 +259,7 @@ ldbm_back_modify(
                        cache_return_entry_r( &li->li_cache, matched );
                } else {
                        rs->sr_ref = referral_rewrite( default_referral, NULL,
-                                               &op->o_req_dn, LDAP_SCOPE_DEFAULT );
+                               &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
 
                rs->sr_err = LDAP_REFERRAL;
@@ -267,8 +267,7 @@ ldbm_back_modify(
                goto return_results;
        }
 
-       if ( !manageDSAit && is_entry_referral( e ) )
-       {
+       if ( !manageDSAit && is_entry_referral( e ) ) {
                /* parent is a referral, don't allow add */
                /* parent is an alias, don't allow add */
                rs->sr_ref = get_entry_referrals( op, e );
@@ -295,7 +294,7 @@ ldbm_back_modify(
        }
 
 return_results:;
-       cache_return_entry_w( &li->li_cache, e );
+       if( e != NULL ) cache_return_entry_w( &li->li_cache, e );
        ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
 
        send_ldap_result( op, rs );