]> git.sur5r.net Git - openldap/commitdiff
ITS#4532 fix
authorKurt Zeilenga <kurt@openldap.org>
Wed, 10 May 2006 16:53:20 +0000 (16:53 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 10 May 2006 16:53:20 +0000 (16:53 +0000)
CHANGES
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/result.c

diff --git a/CHANGES b/CHANGES
index 201f08035dad0bb61a6192fc8b0e6bfe31022870..c2918c0a7674c6ed5411d2f284ad522a9866c4b1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@ OpenLDAP 2.3.22 Engineering
        Fixed slapd runqueue use of freed memory (ITS#4517)
        Fixed slapd slap_send_ldap_result bug (ITS#4499)
        Fixed slapd thread pool init issue (ITS#4513)
+       Fixed slapd-bdb pre/post-read freeing (ITS#4532)
        Added slapd syncrepl mandatory searchbase check
        Fixed slapadd cn=config issue (ITS#4194)
        Fixed slapd-ldap proxyAuthz of bound identity/override (ITS#4497)
index cd37908a20a8f29e479e798f8d1af21a60d3884a..9a57f7c5a83461022eaaa4bbb17f165b7b11a8d4 100644 (file)
@@ -417,7 +417,7 @@ return_results:
        }
        op->o_private = NULL;
 
-       if( postread_ctrl != NULL ) {
+       if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
                slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
        }
index 14815d5d7b7a2fdc052087f1281882b23e9a5a85..6f15abbbf95e5d598e62c768e6932921928e2aaf 100644 (file)
@@ -527,7 +527,7 @@ return_results:
        send_ldap_result( op, rs );
        slap_graduate_commit_csn( op );
 
-       if( preread_ctrl != NULL ) {
+       if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
                slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
        }
index 21faa993e6e383f03ff32e3e49db0841eeea4937..4854b9e40e6452a324916817ccaa379151d71807 100644 (file)
@@ -607,11 +607,11 @@ done:
                bdb_unlocked_cache_return_entry_w (&bdb->bi_cache, e);
        }
 
-       if( preread_ctrl != NULL ) {
+       if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
                slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
        }
-       if( postread_ctrl != NULL ) {
+       if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
                slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
        }
index e63d71286efae22073aa431519a29c443dc9ca63..73a35df708ca475994466b632a13275c74982dcd 100644 (file)
@@ -826,11 +826,11 @@ done:
        }
        op->o_private = NULL;
 
-       if( preread_ctrl != NULL ) {
+       if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
                slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
        }
-       if( postread_ctrl != NULL ) {
+       if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
                slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
                slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
        }
index fbf6a04a5bfe218b9b3a10692e57fc051bf50f73..b8ea936aa814a094c43bc9a24bf6f0706b97c725 100644 (file)
@@ -1476,6 +1476,7 @@ int slap_read_controls(
        myop.o_bd = NULL;
        myop.o_res_ber = ber;
        myop.o_callback = NULL;
+       myop.ors_slimit = 1;
 
        rc = slap_send_search_entry( &myop, rs );
        if( rc ) return rc;